1. Set the lid to not sleep
vi /etc/systemd/logind.conf
Change #HandleLidSwitch=suspend to HandleLidSwitch =ignore and restart;
2. Set the startup network connection
cd /etc/sysconfig/network-scripts Find the corresponding network card, such as vi ifcfg-enp0s25, change ONBOOT=no to yes.