检查服务器操作系统及其版本的Linux命令是什么?
我使用外壳连接到服务器。
如果需要内核版本信息,请使用uname(1)。例如:
$ uname -a
Linux localhost 3.11.0-3-generic #8-Ubuntu SMP Fri Aug 23 16:49:15 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
如果需要发行信息,则取决于发行版本以及系统是否支持Linux Standard Base。下面是一些检查方法和示例输出。
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Saucy Salamander (development branch)
Release: 13.10
Codename: saucy
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu Saucy Salamander (development branch)"
$ cat /etc/issue.net
Ubuntu Saucy Salamander (development branch)
$ cat /etc/debian_version
wheezy/sid
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句