Wednesday, October 27, 2010

What flavor of linux are you?


If you do any sort of web server admin chances are you'll need to use the command line at some point.

Knowing which OS you're using is an important and basic task which you'll need to master, but it can be difficult figuring out exactly which version you're on.

Are you linux?
If you're running Linux you'll probably be on CentOS, Debian, Fedora, Red Hat or Ubuntu. Of course you might be running FreeBSD or Mac OSX but what's the quickest way to find out?



Running the command uname -a should give you a fairly good idea of what's under the hood. If you're running linux you'll probably see something like this:
Linux OS: Linux {server name goes here} 2.4...i686 i686 i386 GNU/Linux
Mac OSX: Darwin {server name goes here} 9.8.0 Darwin Kernel Version 9.8.0.../RELEASE_I386 i386

If don't see Linux or Darwin or you need more info check out this table of uname examples.

But what type am I?
As we've seen there are many flavors of linux, on most linux systems it's easy to figure out which one you are. Try running one of these commands:
cat /etc/release
cat /etc/redhat-release
cat /etc/*release

On most linux systems, this should output an easy to read name and version number that you can work with.