As per the this question's title,
hostname doesn't return domain info and
domainname returns empty. I want to find out the full machine and domain for the machine I'm using (Mac OS X 10.5.8). How can I go about doing this? Tks.
will have what you are looking for. To extract just the fully qualified domain name
at least in OS X 10.8