Log in
updated 11:29 AM UTC, May 4, 2016

How to give a meaningful name to your localhost in Ubuntu

  • Written by Madhu V Rao
  • Published in General

Many of us at some point will install Apache server and start programming web based applications.

To test the apps, we use or localhost as the web address  which doesnt give a personal touch to the development experience.

Its possible to change it to a meaningful or any name of your choice in Ubuntu easily.

Just edit /etc/hosts file by typing in command:

sudo gedit /etc/hosts

And change the line:	        localhost

to	       localhost          NameOfYourChoice.com


that's it, you can now type in webadress NameOfYourChoice.com in your web-browser to loopback the address.

This utility can also be used to test the website , when you are trying to host a new website and DNS names have no been propagated yet.

Just get the ipaddress of the hosting place and edit the file /etc/hosts file. You can test the website as if its already hosted.


Powered by Bullraider.com
Follow Us on Twitter
Find Us on Facebook
Follow Us on Google
Follow Us on Pinterest