Pages

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

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