Monday, January 14, 2008

How to know the Linux Distribution Name of your machine?

To get simply the OS kernel version you can use the command uname -a

nthattil@nthattil-desktop:~$ uname -a

Linux nthattil-desktop 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC 2007 i686 GNU/Linux


But how to know the distribution..?

You can try one of the below given methods for that..
nthattil@nthattil-desktop:~$ cat /proc/version

Linux version 2.6.22-14-generic (buildd@terranova) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Dec 18 08:02:57 UTC 2007


To get more presided output, you can use,
nthattil@nthattil-desktop:~$ cat /etc/issue.net
Ubuntu 7.10


Or you can also use,
nthattil@nthattil-desktop:~$ dmesg | head -1

[ 0.000000] Linux version 2.6.22-14-generic (buildd@terranova) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Dec 18 08:02:57 UTC 2007 (Ubuntu 2.6.22-14.47-generic)

No comments: