Skip to content

Instantly share code, notes, and snippets.

@Mahedi-61
Created September 14, 2018 06:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mahedi-61/b2170af7dc4a6655e782c162621373ee to your computer and use it in GitHub Desktop.
Save Mahedi-61/b2170af7dc4a6655e782c162621373ee to your computer and use it in GitHub Desktop.
Instructions for installing static and dynamic IP address in Arch Linux
# first, install netctl if not already installed.
sudo pacman -S netctl
# to find out network card name; check
ip link
### configuring Static IP address
# my network card name is enp0s3. Now, copy the sample network card profile
sudo cp /etc/netctl/examples/ethernet-static /etc/netctl/enp0s3
sudo nano /etc/netctl/enp0s3
# replace eth0 with your actual network interface name. enp0s3
# also chnage DNS to this DNS=('8.8.8.8' '8.8.4.4')
sudo netctl enable enp0s3
sudo netctl start enp0s3
# also you have to disable dhcp
sudo systemctl stop dhcpcd
sudo systemctl disable dhcpcd
### configuring DHCP
sudo cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/enp0s3
# replace eth0 with your actual network interface name. enp0s3
sudo nano /etc/netctl/enp0s3
sudo systemctl enable dhcpcd
sudo systemctl start dhcpcd
# to verify check
ip addr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment