One: Check the CPU
more /proc/cpuinfo | grep “model name”
grep “model name” /proc/cpuinfo
If you feel the need to look more comfortable
grep “model name” /proc/cpuinfo | cut -f2 -d:
Well, that’s how familiar Linux commands are.
Two: Check the memory
grep MemTotal /proc/meminfo
grep MemTotal /proc/meminfo | cut -f2 -d:
free -m |grep “Mem” | awk ‘{print $2}’
Three: Check whether the CPU is 32-bit or 64-bit
View CPU bits (32 or 64)
#getconf LONG_BIT
#echo $HOSTTYPE
#uname -a
Four: View the current Linux version
#more /etc/RedHat-release
#cat /etc/redhat-release
Five: Check the kernel version
#uname -r
#uname -a
Six: Check the current time
date
Seven: View hard disk and partition
df -h
fdisk -l
You can also view partitions
du -sh
You can see all the space taken up
du /etc -sh
You can see the size of this directory
Eight: View the installed software package
Check the software package installed during system installation
cat -n /root/install.log
more /root/install.log | wc -l
See which packages are now installed
rpm -qa
rpm -qa | wc -l
yum list installed | wc -l
Oddly enough, the number of installed packages I searched through RPM and yum was not the same. No cause was found.
Nine: view the keyboard layout
cat /etc/sysconfig/keyboard
cat /etc/sysconfig/keyboard | grep KEYTABLE | cut -f2 -d=
Ten: Check selinux
sestatus
sestatus | cut -f2 -d:
cat /etc/sysconfig/selinux
11. View IP and MAC addresses
In the ifcfg-eth0 file you can see MAC, gateway, etc.
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-
The ifconfig | grep ‘inet addr:’ | grep -v ‘127.0.0.1’ | the cut – d: – f2 | awk ‘{print $1}’
Look at the gateway
cat /etc/sysconfig/network
Check the DNS
cat /etc/resolv.conf
Twelve: View the default language
echo LANGUAGE
cat /etc/sysconfig/i18n
13. Check the time zone and whether the UTC time is used
cat /etc/sysconfig/clock
Fourteen: View the host name
hostname
cat /etc/sysconfig/network
To change the host name is to change this file, and it is best to change the host file as well