How to know what distro is it
I have a linux server , I check the /etc/ , there is no *release* file in it , can advise how can I know what linux distro is it ? eg. CentOS , suse
|
You can try this perhaps
Code:
cat /etc/issue Code:
lsb_release -a Code:
cat /proc/version |
Also try looking for a file like:
/etc/*-version Also seems newer releases of some distros are starting to use a file named: /etc/os-release John |
You can sometimes get a clue from distro names encoded in the kernel name:
Code:
uname -a --- rod. |
See for instance rkh_dat_get_os_info() (starting at line 5198 in that revision)? BTW this isn't exactly never asked before.
|
Maybe needs updating but
Code:
function get_distro_name { |
Quote:
|
Thanks for effort.
For SuSE it has both a /etc/lsb-release and a /etc/SuSE-release file. However there is no DISTRIB_ID value set in the file so value n never gets set. I'd suggest putting the /etc/lsb-release as part of else clause and have variable n overrided if DISTRIB_ID variable is set. |
All times are GMT -5. The time now is 04:27 PM. |