1、查看内核版本
cat /proc/version
uname -a
uname -r
root@junyang:~# cat /proc/version
Linux version 4.19.0-6-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20)
root@junyang:~# uname -a
Linux junyang 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux
root@junyang:~# uname -r
4.19.0-6-amd64
2、查看linux版本信息
lsb_release -a
cat /etc/issue
root@junyang:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
root@junyang:~# cat /etc/issue
Debian GNU/Linux 10 \n \l
3、查看linux是64为还是32位
getconf LONG_BIT
file /bin/ls
root@junyang:~# getconf LONG_BIT
64
root@junyang:~# 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
4、直接查看系统的架构
dpkg --print-architecture
arch
file /lib/systemd/systemd
root@junyang:~# dpkg --print-architecture
amd64
root@junyang:~# arch
x86_64
root@junyang:~# 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
注意
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
评论区