How to Change Host-Name in Linux Without Rebooting

You may also like...

3 Responses

  1. Krish Nagarajan says:

    You have missed an important file :
    /etc/hostname

    Enter your hostname into this file for it to persist across reboots (eg while setting it with the hostname command).

    Else you will have to issue the hostname command each time to set the hostname.

  2. If you are using CentOS 7, you can change the hostname with the hostnamectl command:
    hostnamectl set-hostname your.new.hostname

Leave a Reply

Your email address will not be published. Required fields are marked *

Join TecGeeks Community
facebook_circle_color-128   twitter-128   Google Plus  youtube

Subscribe to get latest Linux Tips in your Inbox

Enter your email address:
Join TecGeeks !

      Subscribe to Newsletterbird_mail

Don’t Miss Any Tips, Get TecGeeks in your inbox. It's free:

Subscribe to Our Email Newsletter today to Received updates on the latest news,

Tutorials and free E-Book.

 

Enter your email address:
 

We respect your Privacy, Your information is safe and will never be shared.