Determine Linux version

Home -> UNIX -> Linux

41783 views

From the computer of: qmchenry (339 recipes)
Created: Oct 05, 2004


0 comments:
View all comments

Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

When visiting a new Linux system, it may not be known which of the many flavors and versions the system is. This recipe describes a couple of techniques for determining the version of Linux running on a host.

The command uname -a will generate output like

Linux poly.tech-recipes.com 2.6.5-1.358 #1 Sat May 8 09:04:50 EDT 2004 i686 i686 i386 GNU/Linux

This can be interpreted as:

kernel name:     Linux
hostname:        poly.tech-recipes.com
kernel release:  2.6.5-1.358
kernel version:  #1 Sat May 8 09:04:50 EDT 2004


The specific distribution information is missing from the uname output. Many distributions put this information in a file in /etc like /etc/redhat-release, /etc/debian_version, /etc/gentoo-release, and so on. For the system described by the uname output above, the file /etc/fedora-release contains the following text:

Fedora Core release 2 (Tettnang)

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.





Related recipes:

  How to upgrade Firefox in Linux
  Extract a gzip compressed tar archive in Linux
  Determine Linux ethernet interface speed and duplex
  Safely reboot a Linux system
  RedHat Linux IP Forwarding
  Make Linux ignore a ping
  Mount an ISO file in Linux
  Ubuntu: What Version am I Running?
  Hide your BIND version
  Linux RAID - recreate from scratch

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.