Here is the command which will give you OS name with version along with other detail information.cat /etc/*release*Example: On my ubutnu machine, It shows me.cat /etc/*release*DISTRIB_ID=UbuntuDISTRIB_RELEASE=8.10DISTRIB_CODENAME=intrepidDISTRIB_DESCRIPTION="Ubuntu 8.10"