Setup an static IP on Arch Linux

Setup an static IP on Arch Linux can be done by placing a config file in /etc/netctl/:

$> sudo nano eth0-Valhalla

As you can see, you have to install sudo first. Otherwise you have to switch to root user (su).

In the file you have to place the following lines for example:

Description='Valhalla at home eth0'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.1.7/24')
Gateway=('192.168.1.1')
DNS=('192.168.1.1')

Now you only need to activate the profile and reboot the system:

$> sudo netctl enable eth0-Valhalla
$> sudo reboot

The blogpost Wifi setup on Arch Linux shows how to setup a static IP for wifi connections.

Leave a Reply

Your email address will not be published.

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.