How do I determine the version of a CentOS server without access to any graphical interface? I've tried several commands:# cat /proc/versionLinux 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)) #1 SMP Wed Dec 17 11:41:38 EST 2008# cat /etc/issueRed 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?
How to determine CentOS version?
centos;version
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 the gcc C compiler used to build the kernel.