Skip to content

Instantly share code, notes, and snippets.

@andytryn
Created November 7, 2021 03:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andytryn/bfc34d965e37176548cf67ba387fc7f5 to your computer and use it in GitHub Desktop.
Save andytryn/bfc34d965e37176548cf67ba387fc7f5 to your computer and use it in GitHub Desktop.
Manjaro set static IP Address
# install netctl
sudo pacman -S netctl --noconfirm
# check network card name
ip link
### Config Static IP Address ###
# Card Name : eth0
sudo cp /etc/netctl/examples/ethernet-static /etc/netctl/eth0
sed -i "s/Address=(*.*)/Address=(\'192.168.50.100\/24\')/g" /etc/netctl/eth0
sed -i "s/Gateway='*.*/Gateway='192.168.50.1'/g" /etc/netctl/eth0
sed -i "s/DNS='*.*/DNS='192.168.50.1'/g" /etc/netctl/eth0
# replace eth0 with your actual network interface name. eth0
# also chnage DNS to this DNS=('8.8.8.8' '8.8.4.4')
sudo netctl enable eth0
sudo netctl start eth0
# also you have to disable dhcp
sudo systemctl stop dhcpcd
sudo systemctl disable dhcpcd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment