Quick Links
- Check for a private IP address using the GUI
- Check for a private IP address using the terminal
- Check for a public IP address using the terminal
- Check for a public IP address using the GUI
- Next steps and more
An IP address is like your physical mailing address. Once you connect a Linux distribution like Ubuntu to the internet or a router, your system gets assigned two IP addresses. There’s the private one, which is used to identify your device on an internal network, and the public IP address, which is what websites see when you connect.
It’s important to know your IP address on Linux should you be having network issues or if you’re on a call with an IT administrator and they need to connect remotely. The good news is that Ubuntu makes it easy to see your IP address. You can use the terminal or the graphical user interface (GUI) settings app.
Check for a private IP address using the GUI
Checking for a private IP address through the GUI on Ubuntu is easy.
1. Open Settings.
2. Click Network in the sidebar. (If you’re connected to Wi-Fi, choose Wi-Fi.)
3. Click on the settings gear next to the network that you’re connected to.
You’ll see your IP address listed under IPv4 address.
Check for a private IP address using the terminal
If you want to find a private IP address on Ubuntu using the command-line interface (CLI), just one command is required.
1. Open Terminal.
2. Load network information:
ip a
This command will load all the available network interfaces. Check the one you’re connected to and the IP address will be listed underneath.
Check for a public IP address using the terminal
To check for a public IP address using Terminal, you will need curl installed and a single command. Follow the steps below:
1. Open Terminal.
2. Install Curl:
sudo apt install curl
3. Use Curl to check the private IP address:
curl ifconfig.me
Check for a public IP address using the GUI
You can check a public IP address on Ubuntu by using your web browser of choice.
- Open your web browser. (Firefox should be pre-installed.)
- Visit whatsmyip.org.
You should see your IP address listed at the top of the website.
Next steps and more
Knowing your IP address means you can dive into more advanced settings. For example, you might want to use a static internal IP address. This is just one setting that can be changed, though. Ubuntu is an open-source and highly customizable operating system, giving you plenty of room for additional changes.