为什么80%的码农都做不了架构师?>>>
两种方法:
1. 查看/etc/issue信息
$cat /etc/issue
ubuntu@ubuntu:~$ cat /etc/issue
Ubuntu 12.04 LTS
2. 使用lsb_release –a 命令
ubuntu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise
查看是否为32位系统:
可以用uname -m
ubuntu@ubuntu:~$ uname -m
i686
如果是i386 到 i686, 那就是32位系统;如果是x86_64 , 那就是64系统。
Ref:
uname 命令详解
/question/39995251.html
man uname 之后发现
-m, --machine
print the machine hardware name
-p, --processor
print the processor type or "unknown"
-i, --hardware-platform
print the hardware platform or "unknown"
不知道三者有什么区别?
如果觉得《如何利用shell查看Ubuntu系统版本号和电脑类型》对你有帮助,请点赞、收藏,并留下你的观点哦!