Hostname: Difference between revisions

From KevinWiki
Jump to navigationJump to search
Created page with "Category:Network == Hostname == === Set Hostname === $ sudo echo "your-hostname" > /etc/hostname $ sudo hostname -F /etc/hostname If it exists, edit the file <code>/et..."
 
No edit summary
Line 12: Line 12:


  SET_HOSTNAME='yes'
  SET_HOSTNAME='yes'
=== Update <code>/etc/hosts</code> ===
-Replace <code>192.168.0.111</code> with the ip address of the server.
-Replace <code>blah.some-domain.com</code> with the domain name of the server.
-replace <code>your-domain</code> with the hostname of the server.
file:<code>/etc/hosts</code>
127.0.0.1        localhost.localdomain    localhost
192.168.0.111    blah.some-domain.com    your-domain

Revision as of 14:13, 22 June 2011

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