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
Want to talk with an expert? Schedule a call with our team to get the conversation started.
Linux : uname -n
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: https://www.google.com/search?q=unix+rosetta+stone .
Great point Dave…
Here is one that I like to refer to as well: https://bhami.com/rosetta.html
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.
> 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,