- 1 How to Check the IP Address on Ubuntu
- 1.1 1. Introduction
- 1.2 2. What is an IP Address?
- 1.3 3. Checking the IP Address Using the Command Line
- 1.4 4. Checking the IP Address Using the GUI (Graphical User Interface)
- 1.5 5. Checking Your Public IP Address
- 1.6 6. Difference Between Public and Private IP Addresses
- 1.7 7. Conclusion
- 1.8 8. FAQ: Frequently Asked Questions
How to Check the IP Address on Ubuntu
1. Introduction
When using Ubuntu, you may need to check your IP address for network troubleshooting or server management. The IP address is essential for identifying devices on the internet or a local network. This article explains various ways to check the IP address on Ubuntu, making it easy to understand for both beginners and advanced users.
2. What is an IP Address?
An IP address is a unique number assigned to a computer or device on the internet or a local network. Every device that connects to the internet is assigned an IP address, which is necessary for communication with external networks. There are two main types of IP addresses:
- Public IP Address: An address that identifies your device on the internet. It is provided by your Internet Service Provider (ISP) and is used for external access.
- Private IP Address: An address used within a local network at home or within an organization. It cannot be accessed directly from the internet and is used for internal communication between devices.
Additionally, IP addresses can be dynamic or static. A dynamic IP address changes each time the device connects to the network, while a static IP address is manually set and remains unchanged.

3. Checking the IP Address Using the Command Line
The most efficient way to check the IP address on Ubuntu is by using the terminal. This is particularly useful for server environments or remote operations.
1. Using the ip
Command
You can display network information, including the IP address, with the following command:
ip addr show
The output includes multiple network interfaces, each displaying both IPv4 and IPv6 addresses. The line labeled inet
represents the IPv4 address, while inet6
represents the IPv6 address.
If you prefer a concise display of IP addresses, you can use the -br
option as follows:
ip -br addr
2. Using the ifconfig
Command
In older versions of Linux, the ifconfig
command was commonly used to check IP addresses. On newer versions of Ubuntu, you may need to install net-tools
first.
sudo apt install net-tools
ifconfig
This command displays detailed information for each network interface.
4. Checking the IP Address Using the GUI (Graphical User Interface)
For beginners or users unfamiliar with the command line, the Ubuntu GUI provides a visual and intuitive way to check the IP address. This method is ideal for desktop users.
Step 1: Open Network Settings
On the Ubuntu desktop, click the network icon in the top right corner of the screen and select “Network Settings.”
Step 2: View Detailed Information
In the Network Settings window, select your active network connection (Wi-Fi or wired) and click “Connection Information.” Here, you can find your IPv4 and IPv6 addresses.

5. Checking Your Public IP Address
A public IP address is used to identify your device on the internet. It is assigned by your ISP when you connect to the internet and is used for communication with external servers and services.
Checking with a Command
You can easily check your public IP address using the following command:
curl ifconfig.me
This command will display the public IP address that is visible to the internet.
6. Difference Between Public and Private IP Addresses
Understanding the difference between public and private IP addresses can help you manage your network more effectively.
- Public IP Address: An address that is visible to other users and services on the internet. It enables external connections for web servers, online gaming, remote access, and more.
- Private IP Address: An address used within a home or corporate network. It is not directly accessible from the internet and is used for communication between devices within the same network, such as computers, printers, and smart devices.
7. Conclusion
We have covered various methods for checking the IP address on Ubuntu, including both command-line and GUI approaches. For beginners, the GUI method is recommended, while command-line methods are more suitable for server administrators and remote workers. By using these methods, you can easily check your IP address and troubleshoot network issues efficiently.

8. FAQ: Frequently Asked Questions
Q1: Why do I see multiple IP addresses?
A: If your device has multiple network interfaces (such as Wi-Fi and wired connections), each interface may be assigned a different IP address.
Q2: How can I change my IP address?
A: If you want to set a static IP address, you can use netplan
to configure it manually. Edit the configuration file and apply the changes with sudo netplan apply
.
Q3: How can I keep my public IP address secure?
A: Using a VPN (Virtual Private Network) can help hide your public IP address and protect your privacy when browsing the internet.