Friday, August 13, 2010

How to Change Computer Name or Hostname in Linux

The hostname is stored in the file
/etc/hostname
You can edit that with your favorite editor. I use emacs:
sudo emacs /etc/hostname
You will also need to match that in
/etc/hosts

Cite as:
Saad, T. "How to Change Computer Name or Hostname in Linux". Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2010/08/how-to-change-computer-name-or-hostname.html

1 comment:

  1. I once looked into this problem. I just recall there are 3 places to modify. And for RHEL/centos is different from Unbuntu...

    I don't have my note with me here, maybe not accurate.

    ReplyDelete