Here are the terminal commands to manually assign a static IP address to your network interface in Arch Linux:
Identify Your Network Interface: Use the
ip link
command to list all network interfaces and identify the one you’re using (e.g.,wlan0
for Wi-Fi oreth0
for Ethernet).ip link
Bring the Network Interface Down: Replace
INTERFACE
with your network interface name (e.g.,wlan0
).sudo ip link set INTERFACE down
Assign a Static IP Address: Replace
INTERFACE
with your network interface name,192.168.1.10
with the IP address you want to assign, and192.168.1.1
with your router’s IP address.sudo ip addr add 192.168.1.10/24 dev INTERFACE
Set the Default Gateway: Replace
192.168.1.1
with your router’s IP address.sudo ip route add default via 192.168.1.1
Bring the Network Interface Up:
sudo ip link set INTERFACE up
Configure DNS (optional but recommended): Edit the
/etc/resolv.conf
file to set your DNS server. You can use your router’s IP or a public DNS server like Google’s (8.8.8.8
).sudo nano /etc/resolv.conf
Add the following line:
nameserver 192.168.1.1
Or for Google DNS:
nameserver 8.8.8.8
By following these steps, you should be able to manually assign a static IP address to your network interface in Arch Linux, allowing you to connect to your OpenWrt router for further configuration.