3

I am facing problem to find output the Operating system name and version number on linux system. I hit a command uname -a , but i can't understand the output of this command, can anybody please explain the below output and help me to find the operating system name and version?

$ uname -a
Linux ABC007 2.6.32-573.3.1.el6.x86_64 #1 SMP Mon Aug 10 09:44:54 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

I need to find the Vender name of OS, like Intel, Redhat etc. Any command to do so?

Girdhar Singh Rathore
  • 5,030
  • 7
  • 49
  • 67

3 Answers3

7

from the man page:

DESCRIPTION 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

So, in your case uname -a output is:

Linux ABC007 2.6.32-573.3.1.el6.x86_64 #1 SMP Mon Aug 10 09:44:54 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

  • kernel: Linux
  • Network node hostname: ABC007
  • Kernel release: 2.6.32-573.3.1.el6.x86_64
  • Kernel version: #1 SMP Mon Aug 10 09:44:54 EDT 2015
  • Machine hardware name: x86_64
  • Processor type: x86_64
  • Hardware platform: x86_64
  • Operating system: GNU/Linux
Zermingore
  • 743
  • 2
  • 11
  • 28
  • is this OS of Intel or Red hat ? – Girdhar Singh Rathore Mar 10 '16 at 07:53
  • @GirdharSinghRathore: The information from `uname -a` does not tell you which distribution it is explicitly. There's a decent chance that the `el6` part, and the sub-version (573.3.1) are in fact unique to one distribution, but you'd have to know how the different distributions identify their versions to interpret that information moderately accurately. – Jonathan Leffler Mar 10 '16 at 08:07
4

You can use below command to print the only operating system name and version or Release info:

lsb_release -a

Command Output:(Currently running Ubuntu)

Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:        12.04    
Codename:       precise
enfinet
  • 810
  • 8
  • 18
0
man uname
>for finding out os-name
cat/etc/os-relase
  • 1
    Please edit your post rather than adding extra information as comments. Please try to add more detail to your answers. Also your cat/etc/os-relase is incorrect. Please ensure that you have checked your sample statement is correct, posting the output would have proven this. – OldBoyCoder Jun 13 '16 at 11:23