查看系统信息
查看内核版本
cat /proc/version
uname -a
uname -r
1 2 3 4 5 6 7 8
| root@linux:~ Linux version 4.19.0-6-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6))
root@linux:~ Linux linux 4.19.0-6-amd64
root@linux:~ 4.19.0-6-amd64
|
查看linux版本信息
lsb_release -a
cat /etc/issue
1 2 3 4 5 6 7 8 9
| root@linux:~ No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster
root@linux:~ Debian GNU/Linux 10 \n \l
|
查看linux是64为还是32位
getconf LONG_BIT
file /bin/ls
1 2 3 4 5
| root@linux:~# getconf LONG_BIT 64
root@linux:~# file /bin/ls /bin/ls: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=a65f86cd6394e8f583c14d786d13b3bcbe051b87, stripped
|
直接查看系统的架构
dpkg --print-architecture
arch
file /lib/systemd/systemd
1 2 3 4 5 6 7 8
| root@linux:~# dpkg --print-architecture amd64
root@linux:~# arch x86_64
root@linux:~# file /lib/systemd/systemd /lib/systemd/systemd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=59514d207facb7f6bc5c0e5e39ca740a54d12ead, stripped
|
注意
1
| x86_64,x64,AMD64基本上是同一个东西
|
- x86是intel开发的一种32位指令集
- x84_64是CPU迈向64位的时候
- x86_64是一种64位的指令集,x86_64是x86指令的超集,在
x86
上可以运行的程序,在x86_64
上也可以运行,x86_64是AMD发明的,也叫AMD64
现在用的intel/amd的桌面级CPU
基本上都是x86_64
,与之相对的arm、pcc等都不是x86_64