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

How to solve the problem that viewing IP address does not display under Linux

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

Share

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

This article will explain in detail how to solve the problem of not displaying IP addresses under Linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Preface

Environment: creating a Linux virtual machine on VMware Workstation

Problem: look at the IP address through ifconfig on Linux, but the IP address cannot be displayed

When you enter ifconfig to view, the middle IP address is not displayed, as shown in the following figure

It is found that the network icon in the lower right corner is disconnected and it is determined that the cause of the problem is that the virtual network card is not connected.

Solution: step 1

Click the icon directly to connect manually, as shown in the following figure

Enter ifconfig again to view the IP address and the problem is resolved, but the network is still disconnected when you turn off the virtual machine and turn it on again

Step two

Enter the following command in the command box, and the result is as follows

Vi / etc/sysconfig/network-scripts/ifcfg-ens33

(note: ens33 is the name of the network card)

Click I to enter the file editing state (Note: it needs to be done under the administrator account root)

Change ONBOOT=no to ONBOOT=yes (Note: ONBOOT indicates whether the network card is activated when the system starts)

Click Esc, type: wq, click enter to save and exit

Enter the command service network restart (Note: restart the service command), as shown below

When the computer is shut down and restarted again, the problem is solved, and the final result is as follows

This is the end of the article on "how to solve the problem of not displaying IP addresses under Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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