Whether you're configuring your network or troubleshooting connectivity, knowing your router’s IP address is essential. Here are three straightforward ways to find it on any Linux distribution.
Method 1: Using the Terminal with ip route
Open your Terminal.
Type the following command and press Enter:
ip route | grep default
You’ll see a line showing the default route — the IP address listed there is your router’s.
If iproute2 isn’t installed, use your distro’s package manager:
Distribution Installation Command
Debian-based sudo apt install iproute2
Red Hat-based sudo dnf install iproute
Arch-based sudo pacman -S iproute2
openSUSE-based sudo zypper install iproute2
Method 2: Using NetworkManager
Open your Terminal.
Run the following command:
nmcli device show | grep IP4.GATEWAY
The output will show your router’s IP address under IP4.GATEWAY.
If NetworkManager isn’t installed, here’s how to install and activate it:
Distribution Installation Command
Debian-based sudo apt install network-manager
Red Hat-based sudo dnf install NetworkManager
Arch-based sudo pacman -S networkmanager
openSUSE-based sudo zypper install NetworkManager
Then start and enable the service:
sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager
Method 3: Using the Graphical Interface
Open your System Settings.
Navigate to Network Settings or Connection Details.
Look for the Gateway or Router field — this is your router’s IP address.
With these methods, you’ll have no trouble locating your router’s IP address on any Linux system. Whether you're a terminal enthusiast or prefer graphical tools, Linux gives you the flexibility to stay in control of your network.