Installation Guide/Configure Hostname

From ParabolaWiki
Jump to: navigation, search

1 Set host and hostname

Add the following text to /etc/hosts, in the following form:

/etc/hosts
127.0.0.1	localhost
::1		localhost
127.0.1.1	MY_HOSTNAME.localdomain	myhostname

If the system has a permanent IP address, the final ('MY_HOSTNAME') entry should refer to that, instead of 127.0.1.1.

Replace 'MY_HOSTNAME' with your preferred host name. Your computer's hostname can be anything that you like, consisting of letters a-z, digits 0-9, and hyphens '-' (eg: alices-laptop). The system hostname is mainly informational, making it easier to distinguish computers on your local network. This name will also appear in your shell prompt - eg:

 alice@alices-laptop:~ $
1.1 systemd

On a systemd system, add the same chosen hostname to /etc/hostname, in the following form:

/etc/hostname
MY_HOSTNAME
1.2 OpenRC

On an OpenRC system, add the same chosen hostname to /etc/conf.d/hostname, in the following form:

/etc/conf.d/hostname
hostname="MY_HOSTNAME"