How to find out the machine ID on various UNIXes

Posted in: Technical Track

It recently came up that it would be helpful if we had a cheat sheet to find out the machine names for any given UNIX. I knew these off the top of my head but it would be great if people added more as comments.

HP/HP-UX: /bin/uname -i
IBM/AIX: /bin/uname -m
SGI/IRIX: /sbin/sysinfo -s
Sun/Solaris: /usr/ucb/hostid

Want to talk with an expert? Schedule a call with our team to get the conversation started.

About the Author

Sysadmin and DBA for a while and love my work... Work extensively with Oracle Application 11i.x, SAP, Peoplesoft. Well versed in Oracle Application Server including J2EE applicaiton deployments and Portal. Live in the Ottawa area and am part of a wonderful family - Wife, 2 kids and a dog...

6 Comments. Leave new

Matthew Montgomery
November 21, 2007 4:19 pm

Linux : uname -n

Darrin Leboeuf
November 21, 2007 4:51 pm

Thanks Matt! Just to clarify – uname will typically print some system information and things like kernel name, node name processor architechture etc… The “HostID” is like a MAC address for a server in that is unique for each server.

The command for Linux is also: hostid


Don’t forget the Unix Rosetta Stone as a key to things like this. I believe there are more than one of these now, so try a search for it: .

Darrin Leboeuf
November 21, 2007 5:21 pm

Great point Dave…

Here is one that I like to refer to as well:



I just learned this a month or so ago myself…..On Linux (I haven’t tried on other machines) /etc/issue will give you a more human readable result than uname -a will.

For instance:

> uname -a
Linux hostname 2.4.32-grsec+f6b+gr217+nfs+a32+fuse23+tg+++opt+c8+gr2b-v6.194 #1 SMP [date timezone time] i686 GNU/Linux

> cat /etc/issue
Debian GNU/Linux 3.1 \n \l

The \n and \l as well as other features are described here:

Since there are so many flavors of Linux, this can come in handier than uname -a — with uname -a I had a hard time telling the differences among fedora versions.



/etc/lsb-release should be useful for that, and is less likely to be edited by a system admin. The “lsb” in the filename stands for “Linux Standard Base”; but I’m not sure how widely this file is implemented yet, even in distributions that aim for LSB-compliance.

On my Ubuntu 7.04 box, it reads,



Leave a Reply

Your email address will not be published. Required fields are marked *