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 cannot display the solution for ip

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Solution for Linux virtual machine unable to display IP

1. An IP address is required, so let's first learn to check the IP address of the Centos7 in the virtual machine.

Enter ip query name on the command line: ip a

2. It is found that ens33 does not have the attribute inet, so it is impossible to connect to the virtual machine through the IP address.

Next, take a look at the configuration of the ens33 network card: vi / etc/sysconfig/network-scripts/ifcfg-ens33

Pay attention to the space after vi

Vi is Linux's built-in text editor command to open a file.

3. From the configuration list, you can find that CentOS 7 does not start the network card by default (ONBOOT=no).

Change this item to YES (ONBOOT=yes)

Then press Esc to exit and exit command: wq and then press Enter. (note: wq means to save and then exit)

Then restart the network service: systemctl restart network

4, and then we can enter the ip addr or ip a command to check it.

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

Servers

Wechat

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

12
Report