Discuss How to check Linux version No.? in the Linux Help forum on Dev Shed. How to check Linux version No.? Linux Help forum discussing topics including usage, troubleshooting, modules, and distributions. Linux is an open source OS, based on UNIX.
Posts: 5,654
Time spent in forums: 2 Months 2 Weeks 2 Days 5 h 1 m 44 sec
Reputation Power: 3436
Code:
uname -a
That will tell you which kernel version is running. As far as redhat version number, there might be a file somewhere, or you can guess based on the kernel version maybe.
Also, don't use the tags unless your posting actual code or a command line or console output. Leave your normal post text out of them. It only makes your posts a pain to read. I've told you this before.
Posts: 83
Time spent in forums: 1 Day 2 h 10 sec
Reputation Power: 10
Hello,
You can also find the Linux version from bellow mentioned file.
cat /proc/version == > this file display out put like this
Linux version 2.4.21-27.ELsmp (bhcompile@bugs.build.redhat.com) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47)) #1 SMP Wed Dec 1 21:59:02 EST 2004)
Posts: 6,638
Time spent in forums: 1 Month 2 Weeks 6 Days 2 h 17 m 2 sec
Reputation Power: 2474
If you're sure it's a Red Hat-based system, the release number and codename will be in the /etc/redhat-release file (single line, plain text). On Fedora systems, /etc/redhat-release is a relative symlink to the fedora-release file in the same directory which contains that information.
Edit: I should add that other systems have similar files. For example, a Gentoo system would contain an /etc/gentoo-release file, and so on and so forth.
Posts: 6,638
Time spent in forums: 1 Month 2 Weeks 6 Days 2 h 17 m 2 sec
Reputation Power: 2474
Quote:
Originally Posted by Takkun
google ftw
edit:
sry for being an e-***.
http://linuxreviews.org/man/uname/
Not necessarily. While many distro vendors append a tag to the kernel version, it is not a reliable way to determine the distribution in use. For example, I know a few people who are using's Arch Linux's kernel patchset on Gentoo, and people may choose to rebuild their kernel using vanilla source trees on virtually any distro.
That aside, a mix of uname- and distro-release file-based checking is probably the most accurate way to detect the distro. There are also some commands that show vendor information, such as the GCC version or libc.so.6 headers. None of these are foolproof methods though, for similar reasons that the kernel version isn't a foolproof way to detect the distro in use.
Posts: 5,538
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1050
Quote:
Originally Posted by frankxue
uname -r
That is included with uname -a
example
bash Code:
Original
- bash Code
james@opiate ~ $ uname -a
Linux opiate 2.6.17-gentoo-r4 #2 SMP Fri Jul 28 21:26:12 Local time zone must be set--see zic i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux