Created
November 7, 2021 03:50
-
-
Save andytryn/bfc34d965e37176548cf67ba387fc7f5 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