How to change hostname in ubuntu

by
Share this Article: Facebook0Google+1Twitter0LinkedIn0Reddit0StumbleUpon0

Question : How to   change  hostname  in  ubuntu ?

 

 

Answer:

pirat9@virtual-ubuntu:~$ hostname

OUTPUT:

virtual-ubuntu

Now what  we  have  to do to change  the  hostname:

Open terminal and edit :

edit  /etc/hostname  
edit /etc/hosts

and  change  the name  of  the  host

save  and  exit ,

Restart the computer or  restart  networking services 

try again to test if the hostname has been changed :

pirat9@virtual-ubuntu:~$ hostname

Output

Unixmen_com

 

That`s all :)

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+1Twitter0LinkedIn0Reddit0StumbleUpon0