Solved

Linux hostname

Posted on 2013-12-19
3
174 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
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 76

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now