One: View CPU
More/proc/cpuinfo | grep "model name"
grep "model name"/proc/cpuinfo
If you feel the need to see 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: Check whether the CPU is 32-bit or 64-bit
View the number of CPU bits (+ or 64)
Getconf Long_bit
Four: View the current version of Linux
More/etc/redhat-release
Cat/etc/redhat-release
V: View kernel version
Uname-r
Uname-a
VI: View current time
Date
The above has been described how to synchronize 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
To view the packages installed on the system
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
But strangely enough, 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=
Ten: View selinux status
Sestatus
Sestatus | Cut-f2-d:
Cat/etc/sysconfig/selinux
11: View Ip,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 $} ' |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 Default language
Echo $LANG $LANGUAGE
cat/etc/sysconfig/i18n
13: View your time zone and whether to use UTC time
Cat/etc/sysconfig/clock
14: View Host Name
Hostname
Cat/etc/sysconfig/network
Modify the hostname is to modify this file, but also preferably the host file also modified.
# du-sh # View the size of the specified directory
# uptime # View System uptime, 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 established connections
# netstat-s # View Network statistics
# w # View active Users
# ID # view specified user information
# last # View user log in log
# cut-d:-f1/etc/passwd # View All users of the system
# cut-d:-f1/etc/group # View all system groups
# crontab-l # View Current user's scheduled tasks
# chkconfig–list # List all system services
# Chkconfig–list | grep on # Lists all startup system services
Common CentOS Commands