2

I need to use the command line in order to add a new host resolution on a temporary basis. I use centos.

I need a new localhost resolution such as the following:

127.0.0.1       something.localhost

I this possible with Centos? If so how?

balteo
  • 307

1 Answers1

3

Using the HOSTALIASES env variable does the trick:

echo 'something.localhost localhost' >> ~/.hosts
export HOSTALIASES=~/.hosts
balteo
  • 307