Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How can I get distribution name and version number in a simple shell script?

Given a shell, how can I identify the variant of Unix/Linux that is running on a remote server?

share|improve this question

marked as duplicate by warl0ck, Mat, glenn jackman, Renan, jw013 Oct 3 '12 at 14:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 5 down vote accepted

you can also do cat /etc/*-release to see info about the distribution version and name.

$ cat /etc/*-release

Source: linuxg.net

share|improve this answer
I think cat /etc/*-release* is better. Some distros (Crunchbang is an example) has longer file names. – some user Oct 3 '12 at 16:19

Have you tried either of the following:

uname -a


cat /proc/version
share|improve this answer

You can try :

cat /etc/issue

Maybe not all distro have this file.

share|improve this answer
Or it may be confusing on others. Ubuntu's will say something like "wheezy/sid" since they do not change this file when they sync Debian unstable. – jordanm Oct 3 '12 at 14:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.