How to change the hostname in Linux

26 Jun, 2007  |  Posted by Danesh  |  in Linux

Changing your Linux machine’s hostname is easy. Just follow the steps below.

root# hostname [new-host-name]

root# vi /etc/sysconfig/network

HOSTNAME=[new-host-name]

root# vi /etc/hosts

Make sure your new host is updated in the hosts file.

root# service network restart

Done!!

  • Digg
  • del.icio.us
  • BlinkList
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Furl
  • Google
  • Live
  • Facebook
  • Pownce
  • TwitThis
  • E-mail this story to a friend!
Tags: ,

No Responses so far | Have Your Say!

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>