Hostname

From KevinWiki

Revision as of 07:40, 16 December 2012 by Kevin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Hostname

Set Hostname

$ sudo echo "your-hostname" >> /etc/hostname 
$ sudo hostname -F /etc/hostname 

If it exists, edit the file /etc/default/dhcpcd to comment out the "SET_HOSTNAME" directive:

file: /etc/default/dhcpcd

SET_HOSTNAME='yes'


Update /etc/hosts

  1. Replace 192.168.0.111 with the ip address of the server.
  2. Replace blah.some-domain.com with the domain name of the server.
  3. replace your-domain with the hostname of the server.
file:/etc/hosts
127.0.0.1        localhost.localdomain    localhost
192.168.0.111    blah.some-domain.com     your-domain
Personal tools