设置固定ip
一、查看CentOS版本信息
# 1、
cat /etc/redhat-release
# 2、
uname -a
# 3、
uname -r
# 4、
cat /proc/version
# 5、
cat /etc/issue
# 6、
rpm -q centos-release
二、查看系统是32位或者64位的方法
1、使用命令 getconf LONG_BIT and getconf WORD_BIT
getconf LONG_BIT
# 返回结果:64
getconf WORD_BIT
# 返回结果:32
分析:32位的系统中int类型和long类型一般都是4字节,64位的系统中int类型还是4字节的,但是long已变成了8字节inux系统中可用”getconf WORD_BIT”和”getconf LONG_BIT”获得word和long的位数。64位系统中应该分别得到32和64。
2、使用命令 file /bin/ls
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.18, stripped
ELF 64-bit LSB 表示该系统为64位
Q.E.D.