A: Using CentOS common command to see cpu
more / proc / cpuinfo | grep "model name"
grep "model name" / proc / cpuinfo
[Root @ localhost /] # grep "CPU" / proc / cpuinfo
model name: Intel (R) Pentium (R) Dual CPU E2180@2.00GHz
model name: Intel (R) Pentium (R) Dual CPU E2180@2.00GHz
If you feel the need to see a more comfortable
grep "model name" / proc / cpuinfo | cut-f2-d:
2: Using CentOS common command to see memory
grep MemTotal / proc / meminfo grep MemTotal / proc / meminfo | cut-f2-d: free-m | grep "Mem" | awk '(print $ 2)'
3: Using CentOS common command to see cpu is 32-bit or 64-bit
View CPU digits (32 or 64)
getconf LONG_BIT
4: Using CentOS common command to see the current version of linux
more / etc / redhat-release
cat / etc / redhat-release
5: Use common command to see the kernel version of CentOS
uname-r
uname-a
6: Using CentOS common command to see the current time
The above date has been how to synchronize time
7: Using CentOS common command to see the hard disk and partition
df-h
fdisk-l
You can also view partition
du-sh
You can see all the space occupied by the
du / etc-sh
You can see the size of this directory
8: Using CentOS common command to see the installed packages
View the system when the installation package to install
cat-n / root / install.log
more / root / install.log | wc-l
See who is already installed package
rpm-qa
rpm-qa | wc-l
yum list installed | wc-l
But very strange, I passed the rpm, and yum install the package in two ways the query, the number not the same. Did not know the cause.
9: Using CentOS common command to see the keyboard layout
cat / etc / sysconfig / keyboard
cat / etc / sysconfig / keyboard | grep KEYTABLE | cut-f2-d =
10: Using CentOS common command to see selinux case
sestatus
sestatus | cut-f2-d:
cat / etc / sysconfig / selinux
11: Using CentOS common command to see the ip, mac address
In 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 the gateway cat / etc / sysconfig / network view dns cat / etc / resolv.conf 12: Using CentOS common command to see the default language
echo $ LANG $ LANGUAGE
cat / etc/sysconfig/i18n
12: Using CentOS common command to see whether the use of their time zone and UTC time
cat / etc / sysconfig / clock
13: Using CentOS common command to see the host name
hostname
cat / etc / sysconfig / network
Modify the host name is to modify this file, while at best the host file also changes.
14: Using CentOS common command to see the boot running time
uptime
09:44:45 up 67 days, 23:32, ...
Segment seems to have really the problem, my machine is 67 days before the boot.
# System resource usage
vmstat 1-S m procs ----------- memory ---------- --- swap - ----- io ---- - system - - ---- cpu ------ rb swpd free buff cache si so bi bo in cs us sy id wa st 0 0 0 233 199 778 0 0 4 25 1 1 3 0 96 0 0 0 0 0 233 199 778 0 0 0,010,298,561,318,600