Linux版本显示和区别32位还是64位系统
查看已经安装的Linux版本信息
1.cat /etc/issue 查看版本
[root@master master]# cat /etc/issue \S Kernel \r on an \m
2. cat /etc/redhat-release 查看版本
[root@master master]# cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core)
3. cat /proc/version 查看版本
[root@master master]# cat /proc/version Linux version 3.10.0-862.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) ) #1 SMP Fri Apr 20 16:44:24 UTC 2018
4.uname -a 显示如下
[root@master master]# uname -a Linux master 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
5 uname -r 显示如下
[root@master master]# uname -r 3.10.0-862.el7.x86_64
查看Linux是32位系统还是64位系统
1.file /bin/ls
[root@master master]# file /bin/ls /bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=c5ad78cfc1de12b9bb6829207cececb990b3e987, stripped
2.getconf LONG_BIT 和 getconf WORD_BIT
[root@master master]# getconf LONG_BIT 64 [root@master master]# getconf WORD_BIT 32
3.uname -a
[root@master master]# uname -a Linux master 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
天下难事,必作于易;天下大事,必作于细