Skip to content

Instantly share code, notes, and snippets.

@shakibamoshiri
Forked from andytryn/static_ip.txt
Last active April 10, 2023 05:43
Show Gist options
  • Save shakibamoshiri/4288268ae8e5bc9d57333cbce9363609 to your computer and use it in GitHub Desktop.
Save shakibamoshiri/4288268ae8e5bc9d57333cbce9363609 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