Notes

Keyboard shortcuts

alt-F8 → adjust window size

ctrl-h → toggle show hidden files

Packages

$ sudo apt-get update && sudo apt-get dist-upgrade -y && sudo apt-get full-upgrade -y && sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get check

$ apt list --upgradabale
$ apt list > apt.txt

$ apt-cache search <package>

$ sudo apt install python3-pip gedit default-jre htop ...

$ cat /var/lib/dpkg/status | grep Package:

# sources
$ ls /etc/apt/sources.list.d/

# installed packages
$ ls /var/lib/dpkg/status → installed packages

Security

user w/ sudo
$ sudo su
<user pw>
$ passwd root
<new root pw>

root # log in fresh
$ sudo pkill -9 -u <user> # kill user and processes
$ sudo usermod -u <user ID> <user> # change default ID

Turn GUI on/off

https://linuxconfig.org/how-to-disable-enable-gui-on-boot-in-ubuntu-20-04-focal-fossa-linux-desktop

/usr/lib/systemd/system/[default].target

$ sudo systemctl [set-default|isolate] [multi-user|graphical|rescue][.target]

# TURN ON WHEN OFF
$ sudo systemctl start gdm3

Permissions

Permissions

Hardware discovery tools

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5d31787d-d05b-4d76-802a-9e47d29e3ecc/Untitled.png

Sendmail Mail Transfer Agent

Booting

$ cat /etc/default/grub
GRUB_DEFAULT=[<number-of-OS-to-boot>|saved]

GRUB_DEFAULT=saved # last used
GRUB_SAVEDEFAULT=true
$ sudo update-grub