Ваш ip адрес linux

Определение своего IP-адреса

Знание своего IP-адреса может помочь в решении некоторых проблем с подключением к Интернету. Возможно, вас удивит то, что у вашего компьютера два IP-адреса: IP-адрес компьютера в локальной сети и IP-адрес в Интернете.

Определение своего внутреннего IP-адреса (в локальной сети)

  1. Откройте Обзор и начните вводить: Настройки .
  2. Нажмите на Настройки .
  3. Нажмите Сеть на боковой панели, чтобы открыть этот раздел настроек.

Если доступно более одного типа проводного подключения, вы можете увидеть такие названия, как PCI Ethernet или USB Ethernet вместо Проводное .

Определение своего внутреннего IP-адреса (в локальной сети)

  1. Откройте Обзор и начните вводить: Настройки .
  2. Нажмите на Настройки .
  3. Нажмите Wi-Fi на боковой панели, чтобы открыть этот раздел настроек.
  4. Нажмите кнопку рядом с активным подключением, чтобы узнать IP-адрес и другие сведения.

Определение своего внешнего IP-адреса (в Интернете)

В зависимости от способа подключения вашего компьютера к интернету, внутренний и внешний адреса могут быть одинаковыми.

Дополнительная информация

Смотрите также

  • Создание соединения с фиксированным IP-адресом — Использование статического IP-адреса может упростить предоставление компьютером некоторых сетевых услуг.
  • Что такое IP-адрес? — IP-адрес — что-то вроде телефонного номера вашего компьютера.

You can choose the displayed language by adding a language suffix to the web address so it ends with e.g. .html.en or .html.de.
If the web address has no language suffix, the preferred language specified in your web browser’s settings is used. For your convenience:
[ Change to English Language | Change to Browser’s Preferred Language ]

The material in this document is available under a free license, see Legal for details.
For information on contributing see the Ubuntu Documentation Team wiki page. To report errors in this documentation, file a bug.

Источник

How Do I Find My IP Address in Ubuntu

An IP address identifies any device connected to a network. The IP address is a numerical representation used by devices for communication, such that a package from device A can reach the target destination based on the IP of the given machine. Besides, when connected to the internet, each device has a public IP address unique to that device. So, how can you find your public or private IP address in Ubuntu?

4 Ways of Finding IP Address on Ubuntu

A public IP address is unique to every device on the internet and you should not share your public IP with anyone. However, the private IP can be dynamically assigned by the DHCP server on your local network, meaning it keeps changing.

Читайте также:  Изменение размера дисков linux

To find your public IP, type whatismyipaddress on your browser and you will find it. Alternatively, you can use curl to find it using the command below.

For the private IP address, let us dig in on four ways you can quickly find it.

1. Using ifconfig

The ifconfig command comes as part of the net-tools on Ubuntu and you can use it to analyze and configure your system’s network interfaces.

The command does not come preinstalled on Ubuntu. Instead, you must install the net-tools package for you to access it.

When you execute the command, it will return the available network interface and the IP address of the interface connected to the internet.

In this case, we are connected to the wireless network and our interface is wlan1 with the displayed IP address.

2. Using Hostname

The hostname command is used for displaying the DNS of the host system. However, if you add the -I flag, it will output the IP address of your system. It offers a quick way of getting an IP address on Ubuntu with minimal output.

3. Using IP a

Running the ip address command will display the network details of your system, including the different interfaces and their IP address. A shorthand for the command is ip a.

In this case, we are connected to the wlo1, and you can note the IP address is displayed as highlighted in the image.

4. Check from Network Settings

Aside from using the terminal, there is a graphical way of finding your IP address.

Start by opening the settings on your Ubuntu. You can search for it from your applications or click on it at the top of your window.

Once it opens, click the option for Wi-Fi if you are using a wireless network or Network if you are connected to a wired network.

For Wi-Fi, click on the gear icon next to the wireless network that you are connected to.

Once you click on the settings icon, a menu displaying the details of your Wi-Fi network will open. Your IP is the IPv4 address.

In the case of a wired network, click on Network. Next, click on the gear icon for the wired network on the right.

A window will appear, showing you all your network details, including the IP address, like in the case of Wi-Fi.

Conclusion

An IP address is how a device is recognized on a network. The public IP address is unique for each device connected to the internet and the private IP address is assigned to each device connected to your local network. You can use different ways to find your IP address, and this guide has presented multiple examples.

About the author

Denis Kariuki

Denis is a Computer Scientist with a passion for Networking and Cyber Security. I love the terminal, and using Linux is a hobby. I am passionate about sharing tips and ideas about Linux and computing.

Источник

How to Find or Check Your IP Address in Linux

An IP address is a codename assigned to a computer on a network. It works as a postal address, ensuring that network traffic is sent to the correct computer.

In this tutorial you will learn how to find your IP address using a Linux operating system.

Tutorial on how to find your IP address on Linux.

Find Your IP Address From the Command Line

There are a few different commands you can use to check your IP address. To run these commands, start by opening a terminal window/command line.

Читайте также:  Team speak для linux

Using the hostname Command

One way to check your IP address from the command-line is by using the following command:

The system will display your internal IP address.

get ip address in linux terminal

Using the ip addr Command

Check your ip address with the ip addr command:

The system will scan your hardware, and display the status for each network adapter you have. Look for an entry that says link/ether. Below it, you should see one of the following:

inet6 fe80::a00:27ff:fe76:1e71/64

check ip address with ip addr command in linux

The entries will include one for a wired (Ethernet) adapter and a wireless (Wi-Fi) adapter. You may also have an entry for a virtual adapter. Generally, only one entry will have an IP address listed – that is the one you will want.

Note: The number after the slash – /24 and /64 – specifies the size of the network, and it helps with scanning and mapping network size.

Using the ifconfig Command

The third method to find your IP address involves using the ifconfig command. In the command line, enter the following:

The system will display all network connections – including connected, disconnected, and virtual. Look for the one labeled UP, BROADCAST, RUNNING, MULTICAST to find your IP address. This lists both IPv4 and IPv6 addresses.

Note: When you check your IP address, you may notice the term loopback. This refers to an IP address that returns traffic to the same computer. Usually, the loopback address is 127.0.0.1 . If you see that address listed, either you are looking at the wrong line, or you are not connected to the network.

Read phoenixNAP’s ultimate Linux IP command tutorial with 31 examples to learn more!

Finding Your IP Address in Linux With a GUI

If you are using a point-and-click interface to run your Linux system, you can check your IP address by following these steps:

1. Go to the Application menu and type Settings into the search bar.

2. Click on the Settings icon that appears among the results, as in the image below:

search for settings screenshot in ubuntu

3. Next, find the Network tab in the Settings Menu and click on the Advanced Wired Settings icon.

network settings for finding ip address

4. This opens a new pop-up window with details on wired settings. Here you can find both your IPv4 address and your IPv6 address.

check ip address in wired details

How to Find Public IP Address

To find your public IP address, reach out to an external website.

If you are using a browser, navigate to:

If you are using a command-line or terminal, use a retrieval command like curl or wget to display the external IP address:

wget -O - -q https://checkip.amazonaws.com

example of looking up the public ip

Note: Did you know that when you use curl to connect to an insecure website, the output responds with an error? To resolve it, visit our guide on making curl ignore certificates.

What is a Public/Private IP Address?

Each computer in a network is required to have its own IP address. If two systems have the same IP address, it will generate errors on the network. Most modern networks will detect the problem and prompt you to fix it. However, older networks might get confused, trying to route traffic to both computers.

Most systems will have two different IP addresses:

  • Private IP address: This is the address used on the network. Also, it is the one you will want to use for configuring routing tools. On smaller networks, the internal IP address typically starts with 192.168.x.x. It is dynamically assigned to your computer whenever you connect.
  • Public IP address: This is the IP address that registers on a website when you visit it. When you connect to a small network, your computer connects to a router using an internal IP address. That router, in turn, connects to a bigger network (like an Internet Service Provider), which has its own IP address system.
Читайте также:  Альт линукс удаленный доступ

Note: Learn everything you need to know about public and private IP addresses in our article Public vs. Private IP Address.

Now you know how to find a private and public IP address in Linux using multiple methods.

Each option strikes a balance between speed and complexity. Now you have the flexibility to choose, if you only need your internal IP address, you can use the hostname method. If you need more detailed information, view our article on 31 Linux IP Commands with examples.

Источник

Ubuntu: как узнать IP-адрес сервера / компьютера

Для идентификации ПК в интернете используется свой уникальный IP-адрес, с помощью которого можно обратиться к этому устройству и установить соединение. В этой статье рассмотрим, как узнать IP-адрес Ubuntu Linux на сервере или домашнем компьютере.

Как узнать IP Ubuntu Linux через терминал

Для того, чтобы узнать IP-адрес Ubuntu Linux необходимо выполнить следующую пошаговую инструкцию:

Узнать IP-адрес Ubuntu Linux

  1. Запустить терминал. Для этого можно воспользоваться горячими клавишами Ctrl + Shift + T или открыть его из меню с программами;
  2. Ввести команду $ ip address (либо – одну из вариаций данной команды: ip addr , ip addr show или ip a );
  3. В консоли отобразится список всех текущих сетевых интерфейсов и их параметров. В зависимости от типа подключения нужно найти Ethernet-интерфейс (подписывается следующим образом: enp0s3, eth0) или WiFi (подписывается следующим образом: wlp2s0, wlan0, цифры могут отличаться).
    Внутренний IP-адрес высвечивается в строке inet . На скриншоте ниже это 192.168.0.10/24, где 192.168.0.10 — IP-адрес, а 24 – маска подсети.

Данная команда работает и в других версиях Linux: Debian, Centos.

Как посмотреть локальный IP-адрес Ubuntu: команда hostname

Еще одна команда, которой можно воспользоваться для того, чтобы посмотреть IP-адрес Ubuntu:

В результате на экран выведется информация о всех сетевых адресах хоста, за исключением loopback интерфейса. Если установлено одно единственное соединение, то покажется лишь IP.

Узнать IP-адрес сервера, компьютера Ubuntu

Узнать IP на старых дистрибутивах Ubuntu — ifconfig

В старых дистрибутивах Ubuntu можно прописать команду:

В новых она уже не поддерживается.

Как проверить IP-адрес Ubuntu через графический интерфейс

Если в системе присутствует встроенный графический интерфейс, то можно узнать IP-адрес компьютера следующим образом:

  1. Открыть параметры системы;
  2. Перейти в раздел «Сеть»;
  3. Нажать на кнопку с иконкой шестеренки рядом с информацией о сетевом подключении;
    Параметры сеть Ubuntu
  4. В первой вкладке «Сведения о системе» отобразится текущий IP.
    Посмотреть локальный IP-адрес Ubuntu в GUI

Как узнать внешний IP-адрес Ubuntu Linux

Что касается IP-адреса внешнего – публичного, глобально маршрутизируемого, назначаемому устройству, позволяя ему получить доступ в сеть интернет, то для его определения необходимо связаться с удаленным сервером посредством протоколов HTTP / HTTPS или DNS.

Чтобы узнать внешний IP-адрес Ubuntu Linux можно в терминале, запускаемом сочетанием клавиш Ctrl + Shift + T , ввести одну из следующих команд:

$ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F’»‘ ‘< print $2>’

Если есть GUI, то можно просто зайти через браузер на любой сайт, показывающий внешний IP.

Не нашли ответ? Тогда воспользуйтесь формой поиска:

Источник

Оцените статью
Adblock
detector