UNAME COMMAND IN LINUX

In this post we will learn how to use uname command in linux .

uname in linux

Uname is a program in linux operating system that prints the name, version and other details about the current machine and the operating system running on it.

  • To print all information .
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux
  • To print the kernel name
[root@localhost ~]# uname -s
Linux
  • To print the node name
[root@localhost ~]# uname -n
localhost.localdomain
  • To print hardware platform
[root@localhost ~]# uname -i
i386
  • To print processor type
[root@localhost ~]# uname -p
i686
  • To print operating system in your machine
[root@localhost ~]# uname -o
GNU/Linux
  • To print machine hardware name
[root@localhost ~]# uname -m
i686
  • To print the kernel release
[root@localhost ~]# uname -r
2.6.18-164.el5
  • To print kernel version .
[root@localhost ~]# uname -v
#1 SMP Tue Aug 18 15:51:54 EDT 2009
  • To print out all version information
[root@localhost ~]# uname --version
uname (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
  • If you need any help in uname command
root@localhost ~]# uname --help
Usage: uname [OPTION]...
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 bugs to <bug-coreutils@gnu.org>.

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s