How to find information about the system/machine in Unix?

In addition to uname -a, which gives you the kernel version, you can try:

lsb_release -idrc  # distro, version, codename, long release name

Most Desktop Environments like GNOME or KDE have an "about" or "info" menu option that will tell you what you use currently, so no commandline needed there really.


As @milk pointed out, you can use uname -a and that will tell you information on all the UNIXes I have access to. For example, on Linux:

Linux localhost 2.6.33.6-147.2.4.fc13.x86_64 #1 SMP Fri Jul 23 17:14:44 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

On FreeBSD:

FreeBSD localhost 6.3-RELEASE-p3-jc1 FreeBSD 6.3-RELEASE-p3-jc1 #2: Thu Aug  7 14:36:29 PDT 2008 [email protected]:/usr/obj/usr/src/sys/jail7  i386

On OpenSolaris:

SunOS localhost 5.11 snv_134 i86pc i386 i86pc

As far as the desktop environment question goes, you should be able to echo $DESKTOP_SESSION in KDE or GNOME and get back the right answer.

If you want to find out what distro you're running, a cheater's shortcut is to cat /etc/*-version /etc/*-release.


Maybe you can use

uname -a

to get information about the kernel version and which OS you are using.