Source of the Problem#
I often use VMware virtual machines for learning Linux. However, sometimes I may encounter an issue where the virtual machine's network interface disappears, causing it to be unable to connect to the network.
Solution#
To resolve the issue of a disappearing VMware virtual machine network card, you can use the following three commands:
1.
sudo service network-manager stop
sudo rm /var/lib/NetworkManager/NetworkManager.state
sudo service network-manager start
These commands work as follows:
-
sudo service network-manager stop
: This command stops the network manager service. The network manager is a tool used for managing network interfaces, automatically configuring them, and handling network connections. -
sudo rm /var/lib/NetworkManager/NetworkManager.state
: This command deletes the network manager's state file. This file stores the current state of the network manager, and if it becomes corrupted, it may cause the network interface to disappear. -
sudo service network-manager start
: This command restarts the network manager service, allowing for the reconfiguration of network interfaces and resolving the issue of the disappearing network card.
Notes#
When executing these commands, please take note of the following:
Administrator privileges required: These commands require administrator privileges to execute, so prefix them with sudo.
Possible impact on network connections: These commands stop and restart the network manager service, which may affect other applications currently using the network.
Although the method I shared has successfully resolved the issue for me and my friends in similar situations, it may not work in certain special cases. If you encounter such a situation, you may need to seek alternative solutions.
This article is synchronized and updated to xLog by Mix Space.
The original link is https://api.xn--i2r.cc/posts/Technology-Sharing/TS1