DEV Community

Narenthera Prasanth M
Narenthera Prasanth M

Posted on

Create custom alias for in Ubuntu

In some cases developers need some alternates for localhost to access the IP in our system.

Here we are going to see how to setup alias for IP in Ubuntu.

Step 1 :

We need to edit /etc/hosts file to add new aliases

Step 1

In hosts file, you can see the localhost configured as alias for

Step 1.1

Step 2 :

Add your alias like below and save it.

Step 2

Now localhost, and are aliases for IP

Note : Browser always search in your local domain registry before reached to DNS server.

Top comments (0)