centos查看系统信息

查看系统版本号

[root@jin test]# cat /etc/redhat-release 
CentOS release 6.8 (Final)
[root@jin test]# cat /etc/issue
CentOS release 6.8 (Final)
Kernel \r on an \m

查看内核版本号

[root@jin test]# cat /proc/version 
Linux version 2.6.32-642.4.2.el6.x86_64 (mockbuild@worker1.bsys.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) ) #1 SMP Tue Aug 23 19:58:13 UTC 2016

查看主机名

[root@jin test]# uname -a
Linux jin.com 2.6.32-642.4.2.el6.x86_64 #1 SMP Tue Aug 23 19:58:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@jin test]# hostname 
jin.com

查看登陆账户的信息

[root@jin test]# w
 17:22:13 up 5 days,  2:08,  1 user,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/1    192.168.1.62     09:18    0.00s  6.51s  0.00s w
[root@jin test]# who
root     pts/1        2016-11-02 09:18 (192.168.1.62)

查看用户的uid,gid和所属的用户组

[root@jin test]# id root
uid=0(root) gid=0(root) 组=0(root)

查看当前登陆的事哪个账号

``shell
[root@jin test]# whoami
root
```

标签: linux

添加新评论