Ubuntu Server

1. WIFI Conf

Edit on netplan is an option, but nmtui is much faster.

apt install ubuntu-drivers-common
apt install networkmanager nmtui  
nmtui

then follow the graphics, connect to wifi ap.


2. Prevent system suspend when lid closing

Dell Community

If you're not logged in as root, you'll need to add "sudo " to invoke the editor as in:

sudo nano /etc/systemd/logind.conf

In the file above, changed this line:

HandleLidSwitch=suspend

to this:

HandleLidSwitch=ignore

After saving the file, ran:

sudo systemctl restart systemd-logind

This will immediately resolve system suspending issue.


3. Enable screen off after lid closing

Server is running now, smooth Wifi and no suspending. If you look closely, you'll find the screen is bright even lid closing. It should be not a problem, if you don't care about heat, power waste, screen life expiration.

Ubuntu Community

Since Ubuntu 18.04 doesn't have a /etc/rc.local file by default we need to create one.

sudo vi /etc/rc.local

press i to enter insert mode

Type the following 3 lines

1
2
3
#!/bin/bash    
setterm --blank 1 # here 1 means 1 minute 
exit 0 

Next press escape, then type :wq to save and quit vi

Now change the permissions so the file can execute

sudo chown root /etc/rc.local
sudo chmod 755 /etc/rc.local

now restart the rc-local service. Type the following

systemctl restart rc-local


Related Posts


Published

Category

Server

Tags

Contact