Erle Robotics Introduction to Networking in Linux

Network configuration files

In Linux we are able to configure the network by editing the configuration files.We can find this files in the etc directory and edit them using, for example vi text editor.(If they don't exist, you can create them and they will update their content automatically).



Contains information required to configure the interfaces of host network at boot time. It also allows you to set static routes to other networks.

What you find if you go to networks directory and open interfaces, by typing:

vi interfaces

Is text editable file like this:



Here is specified the name of the machine.



As we have seen in 5.1 Host Basics, in the file /etc/hosts specify the IP along with the name of each machine you want to access by name. The /etc/hosts file always contains the localhost IP address,, which is used for interprocess communication(never remove this line).Sometimes contains addresses of additional hosts, which can be contacted without using an external naming service such as DNS (the Domain Name Server).



In the file / etc / resolv.conf specify what servers use to resolve domain names.



Defines the order in which to contact different name services.