3

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?

0

3 Answers 3

6

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

$ cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=12
DISTRIB_CODENAME=lisa
DISTRIB_DESCRIPTION="Linux Mint 12 Lisa"

Source: linuxg.net

1
  • I think cat /etc/*-release* is better. Some distros (Crunchbang is an example) has longer file names.
    – some user
    Commented Oct 3, 2012 at 16:19
3

Have you tried either of the following:

uname -a

or

cat /proc/version
2

You can try :

cat /etc/issue

Maybe not all distro have this file.

1
  • 1
    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
    Commented Oct 3, 2012 at 14:32

Not the answer you're looking for? Browse other questions tagged .