uname Command in Linux with Examples

uname Command

uname command is used to display the software and hardware information in current running Linux system. uname command is default shell command in Linux.

SYNTAX

uname [option]

OPTIONS:

-a = Display the all possible information about your system.

-o = Display the operating system name.

-s = Display the current using kernel name.

-v = Display the current using kernel version.

-r = Display the current using kernel release information.

-m = Display the machine information.

-n = Display the host name

-p = Display the current using processor information

-i = Display the hardware platform information

--help = Display the uname help

--version = Display the uname version.

Display all information about your system

To display all the information about your system the parameter -a is used in uname command. This will print all the possible information’ s about current running system.


Example:

[user1@linuxhelp ~]$ uname -a
Linux linuxhelp.localdomain 2.6.32-573.8.1.el6.x86_64
#1 SMP Tue Nov 10   18:01:38 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Display the Kernel name

To display the kernel name and the current using kernel information, parameter -s is used in uname command.


Example:

[user1@linuxhelp ~]$ uname -s
 Linux

Display the Kernel Version

To display the current kernel version in your Linux system parameter &ndash v is used in uname command.


Example:

[user1@linuxhelp ~]$ uname -v
 #1 SMP Tue Nov 10 18:01:38 UTC 2015

Display the Kernel Release Information

The parameter -r is used to display the kernel release information.

Example:

[user1@linuxhelp ~]$ uname -r
 2.6.32-573.8.1.el6.x86_64

Display the Machine Information

The parameter -m is used to display the current using machine information. If the output is x86_64 then it indicates 64 bit and if it’ s i686 then it indicates 32 bit.

Example:

[user1@linuxhelp ~]$ uname -m
 x86_64

This shows that it’ s a 64 bit.

Display the Host name

To display the host name or node name using the parameter -n.

Example:

[user1@linuxhelp ~]$ uname -n
 linuxhelp.com

Display the Processor Information

To display the current processor information using parameter -p. If the output is x86_64 then it indicates 64 bit and if it’ s i686 then it indicates 32 bit.

Example:

[user1@linuxhelp ~]$ uname -p
 x86_64

Display the System Hardware Information

To display the current System Hardware information using parameter -i. If the output is x86_64 then it indicates 64 bit and if it’ s i686 then it indicates 32 bit.

Example

[user1@linuxhelp ~]$ uname -i
 x86_64

Display the Operating System name

To display the Operating System Name use uname with option -o. It will print the current using operating system name.

Example:

[user1@linuxhelp ~]$ uname -o
 GNU/Linux

Display the uname version

To print the current uname version use uname with parameter --version.

Example

[user1@linuxhelp ~]$ uname --version
 uname (GNU coreutils) 8.4
 Copyright (C) 2010 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.

Display the uname help

To display the all possible commands and its abbreviations use uname with option --help.

Example

[user1@linuxhelp ~]$ uname --help
Print certain system information. With no OPTION, same as -s.
-a, --all               print all information, in the following order, except omit -p and -i if unknown:
-s, --kernel-name       print the kernel name
-n, --nodename           print the network node hostname
-r, --kernel-release     print the kernel release
-v, --kernel-version     print the kernel version
-m, --machine           print the machine hardware name
-p, --processor          print the processor type or " unknown" 
-i, --hardware-platform print the hardware platform or " unknown" 
-o, --operating-system   print the operating system
--help     display this help and exit
--version output version information and exit
Report uname bugs to bug-coreutils@gnu.org
GNU coreutils home page: < http://www.gnu.org/software/coreutils/> 
General help using GNU software: < http://www.gnu.org/gethelp/> 
For complete documentation, run: info coreutils ' uname invocation' 
 
Tag : uname
FAQ
Q
What is a command to get the information about hardware in a Linux system?
A
You can get the information about the hardware in Linux system using the uname command with option of "-i". For Ex: "uname -i".
Q
How to get all the information about the Linux system and Operating system architecture using the uname command?
A
You can use the option of "-a" wherein an uname command to get all information about the Linux system and Operating system architecture.
Q
How to find information about Operating system of Linux using the uname command?
A
You can get information about the Linux Operating system using the uname command with option of "-o".
Q
How to find release detail about the Linux system architecture using the uname command?
A
uname command can also be used to fetch the kernel release information about Linux system. The option "-r" will be used. For ex: "$ uname -r"
Q
What is the command to found network node hostname using a uname command?
A
You can use "-n" option to fetch the network node host name of your Linux system. For ex: "$ uname -n O/P:dev-server"