Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

Changing Hostnames


Changing your hostname is not always trivial. Over time it permeates to various files in /etc. But the starting point to changing your hostname, for example from porsche to zafira is:

  # hostname zafira

To ensure the changed hostname will survive a reboot edit /etc/hostname to make the same change. This is where the name is obtained at boot time.

Then search through /etc for occurrences of the old name, just in case:

  # grep -r -n porsche /etc

Typically you will find the hostname hardwired in /etc/hosts, /etc/mailname, /etc/motd, and various apache, ppp, ssh, and exim files, depending on your setup. These can probably be edited by hand to replace the hostname.

While these changes can generally be made without any problem, there are rare occasions where the next reboot might complain. It's useful to be careful, but not concerned!


Copyright © 1995-2006 [email protected]

 
 
  Published under the terms fo the GNU General Public License Design by Interspire