Search This Blog

How to change the localhost name in ubuntu Linux?

This post is especially for ubuntu users.

apache server should be installed.

  • Open the Terminal
  • type this command and press enter
sudo gedit /etc/hosts
hosts will be opened in notepad.
you can find this line :    localhost.localdomain    localhost

Just change the localhost to
Restart the apache server.
Don't you know how to restart the server. nothing to worry just enter the following command in terminal:
sudo /etc/init.d/apache2 restart

if you enter "",then you will get this page in your browser.


Post a Comment