How do I determine the version of a CentOS server without access to any graphical interface? I've tried several commands:
# cat /proc/version
Linux version 2.6.18-128.el5 (mockbuild@hs20-bc1-7.build.redhat.com)
(gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) …
# cat /etc/issue
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
but which one is correct: 4.1.2-4 from /proc/version
or 5.3 from /etc/issue
?
Best Answer
As you can see in
/etc/issue
, you're using CentOS 5.3. (It says Red Hat because CentOS is based upon the RH sources, and some software checks/etc/issue
to identify the distro in use; thus, they'd fail if this was changed to CentOS).The
4.1.2-4
in/proc/version
refers to the version of thegcc
C compiler used to build the kernel.