Sometimes it’s a pain in the ass to install software on unix based systems without having prior knowledge to the OS/kernel versions. You’d do something on debian that doesn’t work on CentOS, Fedora has yum pre-installed where as RHEL4 comes with up2date but you have to have a key, then there’s always RPM’s but who really wants to use RPM’s? You might as well just compile it yourself from source.

Here is a few commands that (should) return exactly what kind of linux operating system you are running.

Use command ‘uname -a’ to check current version and type of your Linux OS

For example you get:

Linux 2.6.32-042stab055.10 #1 SMP Thu May 10 15:39:22 MSD 2012 i686 i686 i386 GNU/Linux

More options of uname command:

[root@voip]# 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

Also you can use

cat /proc/version

Example output:

Linux version 2.6.32-042stab055.10 (root@rh6-build-x32) (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) )

or

cat /etc/issue

Example output:

CentOS release 6.2 (Final)

Hope it help you guys to find our which Linux distro and it’s version you are running with.

Tagged with:
 

Leave a Reply