One: View 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:
Two: View memory
grep memtotal/proc/meminfo
grep Memtotal/proc/meminfo | Cut-f2-d:
Free-m |grep "Mem" | awk ' {print $} '
Three: See whether the CPU is 32-bit or 64-bit
View CPU digits (64 or)
Getconf Long_bit
Four: View the current Linux version
More/etc/redhat-release
Cat/etc/redhat-release
Five: View kernel version
Uname-r
Uname-a
VI: View current time
Date
It already describes how to sync time,
Seven: View hard disks and partitions
Df-h
Fdisk-l
You can also view partitions
Du-sh
You can see all the space occupied
Du/etc-sh
You can see the size of this directory
Eight: View the installed packages
Check the package installed on the system
Cat-n/root/install.log
More/root/install.log | Wc-l
View the packages that are now installed
Rpm-qa
Rpm-qa | Wc-l
Yum List Installed | Wc-l
It's strange, though, that the number of installation packages I've queried through RPM, and Yum, is not the same. No reason was found.
Nine: View the keyboard layout
Cat/etc/sysconfig/keyboard
Cat/etc/sysconfig/keyboard | grep KEYTABLE | Cut-f2-d=
10: View SELinux situation
Sestatus
Sestatus | Cut-f2-d:
Cat/etc/sysconfig/selinux
11: View Ip,mac Address
In the Ifcfg-eth0 file you can see the 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 $} ' |cut-c 6-
Ifconfig | grep ' inet addr: ' | Grep-v ' 127.0.0.1 ' | Cut-d:-f2 | awk ' {print '} '
View Gateway
Cat/etc/sysconfig/network
View DNS
Cat/etc/resolv.conf
12: View the default language
Echo $LANG $LANGUAGE
cat/etc/sysconfig/i18n
13: View the owning time zone and whether to use UTC time
Cat/etc/sysconfig/clock
14: View Host Name
Hostname
Cat/etc/sysconfig/network
Modifying the hostname is to modify the file, and it is best to modify the host file as well.
# du-sh # View the size of the specified directory
# uptime # View system run time, number of users, load
# cat/proc/loadavg # View System load
# iptables-l # View firewall settings
# route-n # View the routing table
# netstat-lntp # View all listening ports
# netstat-antp # View all connections that have been established
# netstat-s # View Network statistics
# w # View active Users
# ID # view specified user information
# last # View User login log
# cut-d:-f1/etc/passwd # View All users of the system
# cut-d:-f1/etc/group # View all groups of the system
# crontab-l # View scheduled tasks for the current user
# chkconfig--list # list all system services
# chkconfig--list | grep on # Lists all initiated system services