Linux basic commands -uname

uname command to print information about the current system (kernel version number, hardware architecture, host name, and operating system type, etc.).

grammar

uname (option)
Options
-a or - All: displays all of the information;
 -m or - Machine: computer display type;
 -n or - nodename: Displays the host name on the network;
 -r or - Release: displays the release number of the operating system ;
 -s or - Sysname: display the name of the operating system;
 - V: shows the version of the operating system;
 -p or --processor: output processor type or " Unknown " ;
 -i or --hardware-platform: output hardware platform or " Unknown " ;
 -o or --operating- system: output operating system name;
 - help: displays help;
 --version: show the version information.

Examples

Use uname command to view all the information:

[root @ localhost ~] # # corresponds uname uname when used alone command uname - S 
the Linux 

[the root @ localhost ~] # uname - A 
the Linux localhost 2.6 . 18 is - 348.6 . . 1 .el5 # . 1 the SMP Tue On May 21 is  15 : 34 is : 22 is the EDT , 2013 i686 i686 the i386 the GNU / the Linux 

[the root @ localhost ~] # the uname - m 
i686 

[the root @ localhost ~] # the uname - n- 
localhost 

[the root @ localhost ~] # the uname - R & lt
 2.6 . 18 is - . 4-686

[root@localhost ~]# uname -s
Linux

[root@localhost ~]# uname -v
#1 SMP Tue May 21 15:34:22 EDT 2013

[root@localhost ~]# uname -p
i686

[root@localhost ~]# uname -i
i386

[root@localhost ~]# uname -o
GNU/Linux

[root@localhost ~]# uname --version
uname (GNU coreutils) 5.97
Copyright (C) 2006free Software Foundation, Inc. 
This is free software. You can follow the GNU GPL agreement <HTTP: // www.gnu.org/licenses/gpl.html> Terms redistribute copies of the software, but we can not guarantee that the relevant law does not limit this situation. 

Written by David MacKenzie.

 

Guess you like

Origin www.cnblogs.com/lj7xun/p/10983190.html