1. View cpumore/proc/cpuinfo | grep & quot; modelname & quot;/proc/cpuinfo. grep & quot; modelname & quot;/proc/cpuinfo | cut-f2-d:
I. View cpu
More/proc/cpuinfo | grep "model name"
Grep "model name"/proc/cpuinfo
If you feel more comfortable to watch
Grep "model name"/proc/cpuinfo | cut-f2-d:
How about linux commands.
II. View Memory
Grep MemTotal/proc/meminfo
Grep MemTotal/proc/meminfo | cut-f2-d:
Free-m | grep "Mem" | awk '{print $2 }'
III. check whether the cpu is 32-bit or 64-bit
View CPU bits (32 or 64)
# Getconf LONG_BIT
# Echo $ HOSTTYPE
# Uname-
IV. view the current linux version
# More/etc/redhat-release
# Cat/etc/redhat-release
V. view the kernel version
# Uname-r
# Uname-
6. view the current time
Date
7. View hard disks and partitions
Df-h
Fdisk-l
You can also view partitions.
Du-sh
The occupied space is displayed.
Du/etc-sh
The directory size is displayed.
8. View installed software packages
View the software packages installed during system installation
Cat-n/root/install. log
More/root/install. log | wc-l
Check the software packages that have been installed.
Rpm-qa
Rpm-qa | wc-l
Yum list installed | wc-l
But it is strange that the number of installation packages I query through rpm and yum is not the same. No reason is found.
9. view the keyboard layout
Cat/etc/sysconfig/keyboard
Cat/etc/sysconfig/keyboard | grep KEYTABLE | cut-f2-d =
10. View selinux information
Sestatus
Sestatus | cut-f2-d:
Cat/etc/sysconfig/selinux
11. View ip address and mac address
In the ifcfg-eth0 file you can see mac, Gateway and other information.
Ifconfig
Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | grep IPADDR
Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | grep IPADDR | cut-f2-d =
Ifconfig eth0 | grep "inet addr:" | awk '{print $2}' | cut-c 6-
Ifconfig | grep 'inet addr: '| grep-v' 127. 0.0.1' | cut-d:-f2 | awk '{print $1 }'
View Gateway
Cat/etc/sysconfig/network
View dns
Cat/etc/resolv. conf
12: view the default language
Echo $ LANG $ LANGUAGE
Cat/etc/sysconfig/i18n
Thirteen: check the time zone and whether the UTC time is used.
Cat/etc/sysconfig/clock
14. view the host name
Hostname
Cat/etc/sysconfig/network
Modifying the host name is to modify this file, and it is best to modify the host file as well.