How To: Disable Sleep/Hibernation on Ubuntu Server

*~grumbles~*

Seriously! My log contained lovely hints like:

[code]Apr 3 12:18:27 server systemd[1]: Reached target Sleep.[/code]

[code]sudo systemctl mask sleep.target[/code]

[code]sudo systemctl mask suspend.target[/code]

[code]sudo systemctl mask hibernate.target[/code]

[code]sudo systemctl mask hybrid-sleep.target[/code]

[code]systemctl status sleep.target[/code]

Finally, thanks for reading. Like always, I love the feedback and the newsletter is still there waiting for you to sign up. If you do sign up, I chose a pretty crappy domain name and you should probably check your spam inbox for the confirmation email.




How To: Enable Numlock on Modern Lubuntu

Now that you have that open, try the following:

[code]sudo apt install numlockx[/code]

Next, open your applications menu, click on Preferences, click on LXQt settings, and then click on Session settings.

Once you have that open, click on Autostart (on the left) and then Add (on the right). Once that is open, give our numlock a name and enter the following command:

[code]/usr/bin/numlockx[/code]

setting up numlockx

See? This is a nice easy one!

Manage Debian Repositories with a GUI

Start your terminal with the trusty CTRL + ALT + T.

[code]sudo nano /etc/apt/sources.list[/code]

commenting out the sources

[code]sudo apt update[/code]

[code]sudo apt install software-properties-gtk[/code]

Software & Updates on Debian

How To: Make Ubuntu Show Asterisks When Typing Password

shoulder-surfing won’t be able to see the number of characters in your password. This is how to get some feedback when you enter your password in the terminal.

[code]sudo nano /etc/sudoers[/code]

Enter your password and hit enter, of course. (This will be the last time you enter your password in the terminal without some sort of visual feedback!)

Now it gets a little tricky. 

Use the down arrow until your at the start of the line that says:

[code]Defaults            mail_badpass[/code]

Press the ENTER button. This should move that line down and leave a blank line above it. Use the arrow button to move up to that blank line and enter:

[code]Defaults[/code]

Then press the TAB button on your keyboard. This will move the cursor to the right location. Add this text:

[code]pwfeedback[/code]

The entire line should look something like:

[code]Defaults            pwfeedback[/code]

Press CTRL + X, then Y, and then ENTER.

[code]sudo apt update[/code]

asterisk feedback in the terminal

See? Asterisks for feedback in the terminal.

How To: Enable a Swapfile

no swapfile

[code]sudo fallocate -l 8G /swapfile[/code]

Why 8 gigabytes when I have ample RAM and an SSD? Because I never, ever want to worry about it again. I want to be able to open up every app I have and leave them open for a month. You do you and decide how big you want it to be!

[code]sudo chmod 600 /swapfile[/code]

[code]sudo mkswap /swapfile[/code]

And turn it on with:

[code]sudo swapon /swapfile[/code]

[code]sudo nano /etc/fstab[/code]

And add this at the bottom of that document:

[code]/swapfile none swap sw 0 0[/code]