Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux system query IP appears 127.0.0.1 how to solve

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Linux system query IP appears 127.0.0.1 how to solve, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

When looking for an IP address in a Linux system, you will encounter a situation that does not display the IP address or only 127.0.0.1. What is the reason for this?

1. Normally, enter the command: ifconfig in the doc box of linux. After typing the enter key, the following result is displayed:

Normal display result

In the eth0 selected in the figure above, the inet addr is followed by the current ip address of the linux system.

Second, abnormal display, and solution 2.1. Exception 1: when looking at the IP address of the current linux, the IP address cannot be found; when you enter ifconfig to view the IP address, there is neither inet addr nor inet6 addr in the eth0. At a glance, it is all code, as shown in the figure:

The reason I encountered this situation is that the virtual network card is not connected properly (there is a dual computer logo in the upper right corner of the interface, and the mouse hover will prompt no network connect, as shown below)

(ps: the linux I installed has a graphical interface, and the logo is seen on the graphical interface)

The cause of the problem: did not start the virtual network card service.

Solution: 1. Open the task manager, select the service tag, and open all vmvare-related services for insurance, as shown below

two。 Just restart linux. I solved it in this way.)

2.2. Exception 2: when viewing the IP address of the current linux, the IP address is displayed as 127.0.0.1. You need to modify the configuration file of the system (very simple, don't be afraid). The solution is as follows:

1. Enter the vi / etc/sysconfig/network-scripts/ifcfg-eth0 command in the command box to display the following results:

two。 Click I or A to enter the file editing state (you need to switch to the administrator account and use Baidu as your own)

3. Change the ONBOOT=no to yes

4. Click Esc

5. Input: wq

6. Click enter to save and exit.

7. Enter command: service network restart (restart service command)

8. If not, restart the linux server.

What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report