Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • I might be wrong, but defining the name of the computer as its network name means that it doesn't have a fixed name, right? When you install a Linux or OSX on a machine, you usually choose a name for that computer (which is the default network name I assume). For example my laptop might be named "FooBar" but when I connect to a network at work I get a hostname such as "machine42.work.localnetwork". Commented Jan 11, 2016 at 12:31
  • @StephenKitt Exactly, does this have another name in Linux systems? Commented Jan 11, 2016 at 12:37
  • 4
    @Sh3ljohn what purpose does computername is osx serve? I don't think there's any equivalent in linux system. Commented Jan 11, 2016 at 12:39
  • Did you give some name other than hostname when installing that computer? Try searching for that name in /etc: grep -ri 'name' /etc Commented Jan 11, 2016 at 12:42
  • @Bibek_G I would like to use this to identify the machine on which I am running from a software of mine. UUID is insufficient because there might be several OS's installed on the same disk which in turn run on the same machine. Commented Jan 11, 2016 at 12:43