blogger templates blogger widgets
This is part of a list of blog posts.
To browse the contents go to

ArchLinux - Configure Network

In most of the cases, without any modifications you should have a working network connection. As was my case.
Try pinging to a network. If an "unknown host" error is received, you need to configure your network.


Most Linux systems uses the file /etc/rc.conf as the principal location for system configuration. This file contains a wide range of configuration information which are used at system startup.

The file is divided into different sections. Move to NETWORKING section. There you will find the following entries along with descriptions.
This is the name of your machine. It could be named anything as you like. The etc/hosts file should also be updated with this hostname. See below for more details. eth0 - Stands for 'Ethernet, card 0'. If you are using static IP, add/edit the interface IP address, netmask and broadcast address. If you are using DHCP or dynamic IP, set eth0="dhcp".
You need to specify all interfaces here. Multiple interfaces should be separated with by space. gateway If you are using static IP, set the gateway address. If using DHCP, you can usually ignore this variable.
If you are using static IP, remove the ! in front of 'gateway'. If using DHCP, you can usually leave this variable commented out with the bang (!), but again, some users require the gateway and ROUTES defined. If you experience networking issues with pacman, for instance, you may want to return to these variables. Example for Dynamic IP (DHCP):
HOSTNAME="myarch" eth0="dhcp" INTERFACES=(eth0) gateway="default gw" ROUTES=(!gateway)
Example forStatic IP:
HOSTNAME="myarch" eth0="eth0 netmask broadcast" INTERFACES=(eth0) gateway="default gw" ROUTES=(gateway)
When using a static IP, modify /etc/resolv.conf to specify the DNS servers of choice. Please see the section below regarding this file.


This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:


Add your hostname, coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this: localhost.localdomain localhost yourhostname


If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish.

Read Configure Network for more information.

The resolver is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.

If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver ).

In my system, though I use DHCP, I have defined DNS servers:

No comments:

Post a Comment