Quick command line tip - find out information about your kernel

A nice short and sweet command line tip today and it's to do with finding out information about the version of the kernel you're running. You might be asked for this information if you are asking for help somewhere or you might be messing around with your kernel.

Whatever you want the information for, you can get information by using the uname command. On its own, it will just tell you the name of the kernel you're running, which if you're on Linux, will quite obviously be - well, Linux.

$ uname

This isn't an awful lot of use on it's own obviously. One thing you might be more interested in is the actual version number of the kernel. You can find this out with:

$ uname -r

Obviously, your output will differ if you're running a different kernel version than I am. You also have other switches, such as -n which gives you the nodename (or network hostname) of the machine you're on and a few more.

For the whole lot of information, use -a which will print all available information about your kernel and operating environment. In my case, that looks like this:

$ uname -a
Linux blackhole 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

As I said, it's a really quick and quite basic tip as well, but it's always good to go over things and remember that there are lots of new Linux users out there who might not know how to do this. Enjoy!

Avatar for peter Peter Upfold - http://peter.upfold.org.uk/

Peter Upfold is a technology enthusiast from the UK. Peter’s interest in Linux stems back to 2003, when curiosity got the better of him and he began using SUSE 9.0. Now he runs Linux Mint 9 on the desktop, runs a CentOS-based web server from home for his personal website and dabbles in all sorts of technology things across the Windows, Mac and open source worlds.

Home » Articles »

Discussion: Quick command line tip - find out information about your kernel

Home » Articles » Quick command line tip - find out information about your kernel