
What version of Linux am I running?I have a Virtual Private Server or a dedicated server running Linux, but I'm not sure which version of Linux (Fedora, CentOS, Debian, etc.) the server is running. How do I find out? Your hosting provider, of course, should have told you what version of Linux you were using when they first set up the dedicated server or the Virtual Private Server for you. But if you don't remember, it's surprisingly non-intuitive to try and figure out which version of Linux your machine is running. Unlike Windows or other operating systems that display the name of the operating system when you first sign on to the computer (Windows XP Home, Windows XP Pro, Windows Vista, Windows 7, etc.), a remote connection to a Linux machine won't automatically tell you what type of Linux you are using. For the purposes of this article I'm assuming that you're connected to your Virtual Private Server or your dedicated server via a shell connection, one that lets you type commands and view the output. (This would normally be a telnet connection, or, more safely, a "secure shell" or SSH connection.) When you initially use SSH to open a connection to your server, you might see a greeting like this:
![]() But, you can find out what version of Linux your server is running, by executing this command:
cat /etc/*release* In Linuxese, this means, "Show me the contents of all files in the "/etc/" directory that have the string "release" somewhere in their names." If you type that command, you should get output something like this:
![]() You can ignore any message like "cat: /etc/lsb-release.d: Is a directory" -- this just means that the command found an item in the "/etc/" directory that had "release" in its name -- "lsb-release.d" -- but it's a directory, so "cat" cannot show you the contents. Instead, "cat" displayed to me the contents of a file that happened to be named redhat-release, and that file shows that this machine is running "CentOS release 5.4 (Final)". On machines running other distributions of Linux (also called other "distros", or sometimes "flavors"), you will get something different. On Suse Linux, the output will be something like: SUSE LINUX 10.0 (X86-64) OSS VERSION = 10.0 On Fedora Linux the output might say: Fedora release 8 (Werewolf) On Ubuntu it might look like: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=7.10 DISTRIB_CODENAME=gutsy DISTRIB_DESCRIPTION="Ubuntu 7.10" In addition, you can run the command uname -ato obtain output like the following:
![]() Of these pieces of information, "2.6.18-028stab062.12" refers to the kernel version (the kernel refers to what could be considered the "heart" of the operating system, the software at the core of Linux without which it could not run at all). "SMP" stands for "symmetric multi-processing" and indicates that the machine includes two or more processors to help run programs faster. (Although keep in mind that on a Virtual Private Server, you're sharing those CPUs with other users.) "Thu Jun 25 20:03:10 MSD 2009" is the current date, and "i686 athlon i386" refers to the type of CPU (not the specific processor on your machine, but the CPU "architecture" or category of CPU that this type of Linux was built to run on). If someone troubleshooting a problem for you asks you for "what type of Linux" you're running, most likely they are referring to the distro, which you can determine with "cat /etc/*release". But it can't hurt to include the output of "uname -a" as well. Bennett Haselton is a technology and political blogger who can answer other questions besides this one, like how to bypass/disable the St. Bernard Internet filter.
Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Stumble Upon
Categorized:
Unix and Linux Help
(Article 9208)
Tagged: fedora, linux, operating systems, ssh, suse, ubuntu, unix, vps Previous: Can I post Facebook updates to just my friends? Next: How do I find my Microsoft Windows product key? Subscribe!
Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader. Wow, I've been reading this site for a few days and only just noticed that it's supposed to be a whiteboard! The site's great but I always thought it was supposed to look like a (big) white page. Then I noticed the edges were quite thick, and, scrolling down, came to these strange shapes on the bottom. I couldn't make head or tail of them. The black thing looked like some sideways tire or button and then suddenly the whole thing snapped into focus as I realized the other things were dry-erase markers. I guess everyone who's asked Dave a question figured it out long ago. Shambhu, thanks! When we were designing it I was tempted to pay my developer to write some code so you could pick up the markers and scribble on the page, but decided no-one would ever notice or try it. :-) Posted by: Dave Taylor at December 11, 2009 9:49 PMI have something to say, now that you mention it, but ...
I do have a comment, now that you mention it!
|
![]()
Search
Find just the answers you seek from among our 2300+ free tech support articles by using our Lijit search engine.
Help!
Subscribe to
Ask Dave Taylor!
Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.
Articles and Reviews
Auctions and Online Shopping Blogs and RSS Feeds Building Web site traffic Business and Management Cell Phones and Mobile Phones CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above HTML and CSS Industry News and Trade Shows Mac OS X Help MySpace, Facebook, Twitter and Social Network Help Pay Per Click (PPC) Search Engine Optimization Shell Script Programming Sony PSP, MP3 Players, Etc. The Writing Business Unix and Linux Help Video Game Tips and Help Windows Help
Recent Entries
Book Links
|