uname
-a或
-m或
-n或-nodename:显示在网络上的主机名称;
-r或
-s或
-v:显示操作系统的版本;
-p或
-i或
-o或
root@debian:~
Linux debian 3.2.0-4-686-pae
root@debian:~
i686
root@debian:~
debian
root@debian:~
3.2.0-4-686-pae
root@debian:~
Linux
root@debian:~
root@debian:~
unknown
root@debian:~
unknown
root@debian:~
unknown
root@debian:~
GNU/Linux
root@debian:~
uname (GNU coreutils) 8.13
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
例子:
uname -a | grep -i 'debian' | wc -l
root@debian:~
Linux debian 3.2.0-4-686-pae