How do I change my hostname in Debian?

bemara57
bemara57 used Ask the Experts™
on
How do I successfully change the hostname on Debian 4? I tried in /etc/hosts but it seems that there is another place where this is stored.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Change  /etc/hostname and run /etc/init.d/hostname.sh start to make the change active
Commented:
To change your Hostname for the current session, you can simply run the command "/bin/hostname your-host-name". To make this change permanent you have to edit /etc/hostname and run "/etc/init.d/hostname.sh start" like owensleftfoot mentioned.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial