-
-
Save shakibamoshiri/4288268ae8e5bc9d57333cbce9363609 to your computer and use it in GitHub Desktop.
Manjaro set static IP Address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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