# How to get your Linux IP address in different ways

There are numerous ways to display your [IP address](https://www.ionos.com/digitalguide/server/know-how/what-is-an-ip-address/) in [Linux](https://www.ionos.com/digitalguide/server/know-how/linux-the-cost-effective-alternative-to-windows/). On the one hand, you have the option of using **commands** such as “hostname” or “ifconfig” in the Linux terminal to get the information. Alternatively, you can move ahead via the **network settings**.

## How to your find your Linux IP address

There are many reasons why you might want to [check your IP address](https://www.ionos.com/digitalguide/hosting/technical-matters/finding-your-ip-address/). This information is important, for example, if you want to forward a router to your computer. Although the **address’** **basic structure remains the same** (consisting of four number blocks and an identification code with digits between 0 and 255), the steps to getting your Linux IP address are a little different than with Windows or Mac. We’ll take you through the process in Linux to find your IP address with Debian or Ubuntu.

## Displaying a private IP address in Linux

One way of finding your private IP address in Linux is using the command “Show IP”. Just follow these steps:

1. Start by opening the **terminal**. You can do this either directly via the app icon or with the key combination \[Ctrl\] + \[Alt\] and \[T\].
2. Now, you’ve got different ways of getting your IP address in Linux. If you enter the command “**ifconfig**” in the terminal, all information will be displayed. You can also use the commands “**ip addr**” or “**ip a**”. Confirm with \[Enter\].
3. You’ll now be shown all IP addresses that are in your network. These might also include those of other devices.

[![Image: Screenshot of the “ifconfig” command in Linux](https://www.ionos.com/digitalguide/fileadmin/_processed_/2/0/csm_screenshot-of-the-ifconfig-command-in-linux_ca1a3c5dab.webp "Screenshot of the “ifconfig” command in Linux")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/screenshot-of-the-ifconfig-command-in-linux.png) You’ll find all information on all devices in your network by using the “ifconfig” command in Linux.       4. To find your own computer’s IP address, search for the “inet” tag. You’ll find this under “wlo1”. Your private IPv4 address will be displayed just next to where it says “inet”. And you’ll find your [IPv6 address](https://www.ionos.com/digitalguide/server/know-how/what-are-the-benefits-of-ipv6/) next to the “inet6” tag.

[![Image: Screenshot of the private IP address in the terminal](https://www.ionos.com/digitalguide/fileadmin/_processed_/f/2/csm_screenshot-of-the-private-ip-adress-in-the-terminal_d74d9329a1.webp "Screenshot of the private IP address in the terminal")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/screenshot-of-the-private-ip-adress-in-the-terminal.png) You’ll find your private IPv4 address just beside the “inet” tag.       ##  Displaying a public IP address in Linux

You can also display your public IP address in Linux. This is the address that’s provided to, for example, websites that you access from your computer. Although it’s possible to determine the address, you should make sure that it’s **not disclosed to third parties**. If you want to display your public IP address in Linux, follow these steps:

1. Start by opening the **terminal** by double-clicking the icon or by using the key combination \[Ctrl\] + \[Alt\] and \[T\].
2. Now use the “**curl ifconfig.me**” command to check your public IP address in Linux. Confirm with the \[Enter\] key.
3. Your public IP address, which also consists of four blocks of numbers, will show up directly below the command.

## More ways to get your IP address in Ubuntu

If you want to find your IP address in [Ubuntu](https://www.ionos.com/digitalguide/server/know-how/ubuntu-the-linux-system-for-everyone/) you have two alternatives.

### Via the terminal

The first alternative involves the “hostname” command. To move ahead with this, just change one step in the process:

1. Open the terminal as described above.
2. Enter the following command: “**hostname -I**” and confirm with \[Enter\].
3. Your IP address will be displayed just below the command.

[![Image: Screenshot of the hostname method](https://www.ionos.com/digitalguide/fileadmin/_processed_/1/b/csm_screenshot-of-the-hostname-method_b1a5442f3d.webp "Screenshot of the hostname method")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/screenshot-of-the-hostname-method.png) You can also get your IP address by using the “hostname” command.       ###  Via the settings

The second way to find your IP address in Ubuntu is through the settings. Here, you can do without the terminal.

1. Click on the cog icon or on “**Settings**” in the menu bar. This will open your settings.
2. Here, select “Network” in the menu.
3. Just beside your internet connection, click on the **arrow** pointing to the right or on the cog icon.
4. A window will open that displays the strength of your network’s connection, the connectivity speed, and your IP address.

[![Image: Screenshot of network options in Ubuntu](https://www.ionos.com/digitalguide/fileadmin/_processed_/1/a/csm_screenshot-of-network-options-in-ubuntu_355f63e84d.webp "Screenshot of network options in Ubuntu")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/screenshot-of-network-options-in-ubuntu.png) You will find all necessary information under Network.       ##  Displaying your IP address in Debian

In case you want to see your IP address in [Debian](https://www.ionos.com/digitalguide/server/know-how/debian-the-universal-system-software/), you also have some options. Besides a graphical option, you can also use the Network Manager. We’ll show you both.

### Via network settings

1. To get your IP address in Debian using the graphical option, click on the **network symbol** in the top right corner of your desktop.
2. Now select the option “**Wired Connected**”.
3. Then click on “**Wired Settings**” to open your network settings.
4. Under “**Wired**” you’ll see a small **cog symbol** on the right. Click on it.
5. A host of information about your network will be displayed. Besides the DNS, [MAC address](https://www.ionos.com/digitalguide/server/know-how/mac-address/) and speed, you’ll also find your IPv4 and IPv6 addresses.

### Via the command line tool

If you want to get to your IP address via Debian’s Network Manager, you can also use the command line tool “nmcli”.

1. Open the **terminal** as described above.
2. Enter the following: “**nmcli -p device show**” and confirm with \[Enter\].
3. A lot of information will now be displayed. You will find the IP address relatively far down on the right next to “IP4.ADDRESS”.

[![Image: Screenshot of Debian’s Network Manager](https://www.ionos.com/digitalguide/fileadmin/_processed_/3/7/csm_screenshot-of-debians-network-manager_15b1080897.webp "Screenshot of Debian’s Network Manager")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/screenshot-of-debians-network-manager.png) Your IP address will be displayed beside “IP4.ADDRESS”.


This is a markdown version of: [https://www.ionos.com/digitalguide/hosting/technical-matters/get-linux-ip-address/](https://www.ionos.com/digitalguide/hosting/technical-matters/get-linux-ip-address/) for AI/LLM consumption.