Solved

Linux hostname

Posted on 2013-12-19
3
192 Views
Last Modified: 2013-12-20
In general, is there a problem copying an entire hosts file from one machine to another

Thanks
0
Comment
Question by:Los Angeles1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 39730732
No, the format is standard across all Linux/Unix and even Windows platforms.

The file is read anew during each lookup, so you don't have to restart/refresh anything.

Just take care that 127.0.0.1 (::1 for IPV6) is "loopback localhost" and nothing else!
0
 
LVL 78

Expert Comment

by:arnold
ID: 39731052
Not sure what the point is, I gather you have entries I there that need copying?
0
 
LVL 8

Expert Comment

by:Surrano
ID: 39731216
There is one catch: some aliases may need different resolution on different machines. E.g. in Solaris "loghost" should always be an alias of the syslog server, which is the machine's primary interface by default. E.g. if I have this host file on fiona:
...
192.168.22.33 fiona loghost
192.168.22.44 shrek
192.168.22.55 donkey
...

Open in new window

then it should look like this on shrek:
...
192.168.22.33 fiona 
192.168.22.44 shrek loghost
192.168.22.55 donkey
...

Open in new window

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question