Questions tagged [hostname]

Hostname is a label assigned to a device connected to a computer network used to identify the device.

A hostname is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication such as the World Wide Web, e-mail or Usenet. Hostnames may be simple names consisting of a single word or phrase, or they may have appended the name of a DNS domain, separated from the host specific label by a period (dot). In the latter form, a hostname is also called a domain name. If the domain name is completely specified including a top-level domain of the Internet, the hostname is said to be a fully qualified domain name (FQDN).

Hostnames that include DNS domains are often stored in the Domain Name System together with IP addresses of the host they represent for the purpose of mapping the hostname to an address, or the reverse process.

Source: Wikipedia.

624 questions
266
votes
5 answers

Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?

This may be a bit of a noobish question, but I was taking a look at /etc/hosts on my new Xubuntu install and saw this: 127.0.0.1 localhost 127.0.1.1 myhostname On most 'nixes I've used, the second line is omitted, and if I want to add my hostname…
Tom
  • 3,213
  • 2
  • 20
  • 19
217
votes
8 answers

Setting the hostname: FQDN or short name?

I've noticed that the "preferred" method of setting the system hostname is fundamentally different between Red Hat/CentOS and Debian/Ubuntu systems. CentOS documentation and the RHEL deployment guide say the hostname should be the…
Cakemox
  • 25,209
  • 6
  • 44
  • 67
182
votes
12 answers

Top level domain/domain suffix for private network?

At our office, we have a local area network with a purely internal DNS setup, on which clients all named as whatever.lan. I also have a VMware environment, and on the virtual-machine-only network, I name the virtual machines whatever.vm. Currently,…
Otto
  • 2,051
  • 3
  • 17
  • 11
110
votes
8 answers

Is it possible to alias a hostname in Linux?

Is it possible to alias a hostname in Linux? It has been asked by jmillikin at various Ubuntu forums as follows: Is it possible to create a hostname alias? Sort of like /etc/hosts, but with other hostnames rather than IP addresses. So that with…
user10178
91
votes
6 answers

How to determine the hostname from an IP address in a Windows network?

My LAN has 50 Windows hosts. At the Windows command line I try ping to get the IP address of a running Windows machine. The question is how to get hostname of a specific IP address in the same Windows workgroup? Another question is how to know the…
billyduc
  • 1,617
  • 8
  • 24
  • 26
75
votes
3 answers

What is the difference between a hostname and a fully qualified domain name?

I am new to the world of setting up servers and am baffled by the term hostname and fully qualified domain name (FQDN). For example, if I want to set up a server that hosts files on the local network i.e. a file server, what would I use a hostname…
PeanutsMonkey
  • 1,892
  • 9
  • 27
  • 28
64
votes
7 answers

Hostnames - What are they all about?

I've recently been "forced" to perform some sysadmin work, while this isn't something that I absolutely love doing I've been reading, experimenting and learning a lot. There is one fundamental aspect of server configuration that I've not been able…
Alix Axel
  • 2,803
  • 6
  • 29
  • 30
54
votes
12 answers

Linux command line utility to resolve host names using /etc/hosts first

There are several command line utilities to resolve host names (host, dig, nslookup), however they all use nameservers exclusively, while applications in general look in /etc/hosts first (using gethostbyname I believe). Is there a command line…
Zulan
  • 625
  • 1
  • 6
  • 8
53
votes
3 answers

Is it valid for a hostname to start with a digit?

Is it valid for a hostname to start with a digit? e.g. 8server From reading RFC 1123 it would appear that this is a valid hostname. However, I'm not clear on whether a hostname can only start with a digit when there is a suffix e.g. 8server.com The…
Mark
  • 1,331
  • 1
  • 11
  • 16
45
votes
4 answers

Is the hostname case sensitive?

Is the hostname case sensitive? Is ping MYHOST equal to ping myhost Does it depend on the DNS used? Are there differences between Win/Mac/Unix systems?
michelemarcon
  • 671
  • 1
  • 7
  • 14
43
votes
3 answers

"My unqualified host name (foo.bar) unknown" Problem

When trying to start sendmail or send a mail using a wordpress plugin, this error shows up in the maillog: "My unqualified host name (foo.bar) unknown; sleeping for retry" After Googling the best advice was, "add foo.bar to the /etc/hosts file",…
Richard Stelling
  • 1,577
  • 2
  • 19
  • 25
35
votes
7 answers

Is it possible for two hostnames share the same IP address?

Can anyone explain whether it is possible for two hostnames to share the same IP address? And what about if one hostname represents more than one IP address, is that possible too? Why?
jean
  • 385
  • 1
  • 3
  • 4
31
votes
2 answers

Why should I use an FQDN instead of the server's IP address?

In my work with servers I have come across in configuration files where you should enter the address to an external server. I have seen some use the server's IP address directly, but I have heard many recommendations to use a hostname fully…
Emil Rowland
  • 429
  • 1
  • 4
  • 8
31
votes
3 answers

How to set the domain name on GNU/Linux?

Similarly to hostname that can be changed in different ways: temporarily using the hostname command permanently using /etc/hostname (or /etc/sysconfig/network or /etc/HOSTNAME, these files are used by the init scripts) I want to change my domain…
Mildred
  • 825
  • 2
  • 10
  • 16
31
votes
6 answers

Can I have dots in a hostname?

I'm using names like "a.alpha" for the hostname of my linux box, but it seems that these names are not completely usable. The response of a hostname shell command is correct (a.alpha). But the name printed after my user account is "user@a" instead…
benzen
  • 423
  • 1
  • 4
  • 8
1
2 3
41 42