Hostname

From KevinWiki

Revision as of 14:13, 22 June 2011 by Kevin (Talk | contribs)
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

-Replace 192.168.0.111 with the ip address of the server. -Replace blah.some-domain.com with the domain name of the server. -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