Sunday, August 17, 2008

How to Find out or Check Linux Version Information

Before installing oracle clusterware it is necessary in which version of linux you are trying to install to. Because based on the version procedure may vary to install clusterware.
Here I mention several ways to check the version of linux.

Find out linux release information
1)On Red Hat Linux,
-bash-3.1$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 4 (Tikanga)

Alternatively,
# rpm -q redhat-release
redhat-release-4ES-2
2)On SUSE Linux,
$cat /etc/SuSE-release
SUSE LINUX Enterprise Server 9 (i586)
VERSION = 9

3)On Debian Release,
debian:/home/Arju/Spark# cat /etc/debian_version
4.0

Find out linux Kernel Version
debian:/home/Arju/Spark# uname -s -r
Linux 2.6.18-4-686

debian:/home/Arju/Spark# uname -a
Linux debian 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 GNU/Linux

-bash-3.1$ uname -a
Linux racnode-1 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux

-bash-3.1$ uname -s -r
Linux 2.6.18-8.el5

Description of the output of uname -a
At the end but the before of OS name the output of "uname -a " shows the OS word-size.
- i686 i386 indicates 32-bit Linux on standard x86 microprocessor series hardware
- x86_64 indicates 64-bit Linux on standard AMD64 or Intel EM64T hardware
- ia64 indicates 64-bit Linux on the Itanium-2 processor developed jointly by Hewlett-Packard and Intel
- s390x indicates 64-bit Linux on IBM S/390 (31-bit) and zSeries (64-bit) hardware.
- ppc64 indicates 64-bit Linux on IBM power based systems that support Linux includes machines branded as pSeries, iSeries, System p5 and System i5.

The first word of the output shows the kernel name. We see the kernel name is linux.
Only itself can be seen by,
-bash-3.1$ uname -s
Linux

The second word of the output of " uname -a " shows the hostname. Here we see the hostname is debian for debian machine and racnode-1 for redhat linux machine.
Only itself can be seen by,
-bash-3.1$ uname -n
racnode-1

The third word of the output of "uname -a" prints the kernel release. Here for racnode-1 machine we see kernel release is 2.6.18-8.el5. Only itselef can be seen by uname -r
-bash-3.1$ uname -r
2.6.18-8.el5

The fourth word print the kernel version. For racnode-1 we see kernel version is #1 SMP Fri Jan 26 14:15:21 EST 2007. Only itself can be seen by, uname -v.
-bash-3.1$ uname -v
#1 SMP Fri Jan 26 14:15:21 EST 2007

The fifth one prints the machine hardware name. Only itself can be seen from ,
-bash-3.1$ uname -m
i686

The sixth one prints the processor type. Here it is seen by,
-bash-3.1$ uname -p
i686

The seventh one prints the hardware platform. Here it is
-bash-3.1$ uname -i
i386

The eighth one print the operating system. Here it is
-bash-3.1$ uname -o
GNU/Linux

In fact "uname -a" is the combination of all these 8. That is "uname -a" is equivalent to,
-bash-3.1$ uname -snrvmpio
Linux racnode-1 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux

Another Way by Cheking issue file
From the /etc/issue file you can also check the version information. In fact it is a text file which contains a message or system identification to be printed before the login prompt.

From here we see for debian machine it is 4.0 and for red hat racnode-1 it is 5.
debian:/home/Arju/Spark# cat /etc/issue
Debian GNU/Linux 4.0 \n \l

-bash-3.1$ cat /etc/issue
Red Hat Enterprise Linux Server release 5 (Tikanga)
Kernel \r on an \m

Related Documents
How to Identify OS or Oracle 64 bit or 32 bit on Unix

No comments:

Post a Comment