*nix tip of the day: what ‘Linux version’ am I using?


Please note that this blog has been moved.

Now it has its own domain: mynixworld.info🙂

If you want to read the latest version of this article (recommended) please click here and I open the page for you.

How to tell the Linux distro version you are using?

Since Linux is not exactly the whole ecosystem of computer programs that you are using on your desktop/server but rather the kernel that allocates the physical hardware resources for the computer programs that you are running, it would not be syntactically nor technically correct to name the version of your OS by the version of your OS kernel.

Who is who?

What we call it generically ‘Linux’ is in fact:

  • a kernel (that project started by Linus Torvalds back in ’90s and lately supported by a bunch of programmers) – an essential part of OS
  • OS programs that run in top of the kernel and which, if are missing, the kernel is just a beautiful but useless piece of furniture.

So the OS is in fact this combination of GNU with Linux added, so called GNU/Linux.

If I run the uname command I got the whole version info, like:

rpi-gentoo ~ # uname -a
Linux rpi-gentoo 3.6.11-cutdown+ #17 PREEMPT Mon Feb 18 14:27:02 CET 2013 armv6l ARMv6-compatible processor rev 7 (v6l) BCM2708 GNU/Linux

Also, the full and the correct name would be GNU/Linux.

In order to tell what ‘Linux version” am I using one should look over the version of its Linux distribution. And that piece of information comes from a file that is located on your /etc folder and which might be called: redhat-release, SuSE-release, debian_version, arch-release, gentoo-release, slackware-version, mandriva-release, etc.

So basically to tell what version is your Linux distribution one should run this command:

rpi-gentoo ~ # cat /etc/*-release /etc/*/-version 2>/dev/null
Gentoo Base System release 2.1

About Eugen Mihailescu

Always looking to learn more about *nix world, about the fundamental concepts of arithmetic, algebra and geometry. I am also passionate about programming, database and systems administration.
This entry was posted in distro, linux, shell and tagged , . Bookmark the permalink.

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