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
Linux
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
2.6.20-16-generic
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!