—- 1.系統(tǒng)基本信息 —-
查看 系統(tǒng)版本
cat /etc/redhat-release
[root@test ~]# cat /etc/redhat-release
CentOS release 6.9 (Final)
查看 處理器架構(gòu)
arch 或 uname -m
[root@test ~]# arch
x86_64
[root@test ~]# uname -m
x86_64
查看 內(nèi)核版本
uname -r 或 cat /proc/version
[root@test ~]# uname -r
2.6.32-696.23.1.el6.x86_64
[root@test ~]# cat /proc/version
Linux version 2.6.32-696.23.1.el6.x86_64 (mockbuild@x86-01.bsys.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) ) #1 SMP Tue Mar 13 22:44:18 UTC 2018
查看 系統(tǒng)信息
uname -a
[root@test ~]# uname -a
Linux test 2.6.32-696.23.1.el6.x86_64 #1 SMP Tue Mar 13 22:44:18 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
查看 系統(tǒng)時(shí)間
date
[root@test ~]# date
Thu Apr 5 16:06:07 CST 2018
—- 2. 用戶相關(guān)信息 —-
查看 當(dāng)前用戶
whoami
[root@test ~]# whoami
root
查看 目前登錄系統(tǒng)用戶
w
[root@test ~]# w
15:50:09 up 22:04, 1 user, load average: 0.00, 0.00,0.00
USER TTYFROMLOGIN@ IDLE JCPU PCPU WHAT
root pts/0 255.255.255.255 15:37 0.00s 0.00s 0.00s w
查看 用戶信息
cat /etc/passwd
[root@test ~]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
查看 用戶組信息
cat /etc/group
[root@test ~]# cat /etc/group
root:x:0:
bin:x:1:binlinux命令大全,daemon
—- 3. 硬件+性能相關(guān) —-
查看 CPU信息
cat /proc/cpuinfo
[root@test ~]# cat /proc/cpuinfo
processor: 0
vendor_id: GenuineIntel
cpu family: 6
model: 79
model name: Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz
……
查看 內(nèi)存信息
cat /proc/meminfo
[root@test ~]# cat /proc/meminfo
MemTotal:2054152 kB
MemFree:1638884 kB
Buffers:31096 kB
Cached:302444 kB
SwapCached:0 kB