Check network settings: First, ensure that the network settings are correct, including the IP address, subnet mask, gateway, and other configurations. You can use the command ifconfig to view the network card settings.
Check network connection: Verify that the network connection is working properly by using the ping command to test network connectivity.
Check the network card driver: Verify if the network card driver is installed correctly by using the lsmod command to see the loaded kernel modules.
Update driver: If the network card driver is outdated or has bugs, it may cause the network card to automatically shut down. You can try updating the network card driver.
Check for hardware malfunction: If the above methods do not work, it may be a hardware issue with the network card. You can try replacing the network card or cleaning the network card slot before reinserting it.
Check the system logs: You can view the system log file /var/log/messages to see if there are any error messages indicating the reason for the network card being turned off.