Skip to content

Instantly share code, notes, and snippets.

@Postrediori
Last active April 28, 2024 12:34
Show Gist options
  • Save Postrediori/6627a379115da10cc423478f5cdd06bf to your computer and use it in GitHub Desktop.
Save Postrediori/6627a379115da10cc423478f5cdd06bf to your computer and use it in GitHub Desktop.
Ubuntu Tips&Tricks

Ubuntu HowTos

Enable VPN in Kubuntu

Install OpenVPN plugin:

apt install network-manager-openvpn

Dual-boot Kubuntu and Windows

Fix clock for dual-boot with Ubuntu and Windows

timedatectl set-local-rtc 1

Single passphrase for several LUKS encrypted disks

  1. Install keyutils
  2. Add keyscript=decrypt_keyctl to /etc/crypttab:
part1_crypt   /dev/disk/...    none    luks,discard,keyscript=decrypt_keyctl

Enable VirtualBox driver with SecureBoot enabled

Sign the driver according to instructions at https://stackoverflow.com/a/59536913

Clear all history (for example, before making .ova)

history -c && history -w

List installed kernels

dpkg --list | grep -E -i --color 'linux-image|linux-headers'

dpkg --list | grep -i -E --color 'linux-image|linux-kernel' | grep '^ii'

Reverse dependencies search

apt-cache rdepends perl

How to disable/enable GUI

Disable GUI on the next boot:

sudo systemctl set-default multi-user

End current Gnome session:

gnome-session-quit

Enable GUI on the next boot:

sudo systemctl set-default graphical

Run Gnome from console mode:

sudo systemctl start gdm3

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

Fix "The following packages have been kept back" error message after apt upgrade

Run:

sudo apt-get --with-new-pkgs upgrade <list of packages kept back>

Source: https://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it/602#602

Fix "Can't locate Text/Iconv.pm in @INC" duruign apt install

Download libtext-iconv-perlpackage manually from https://packages.ubuntu.com (e.g. https://packages.ubuntu.com/mantic/libtext-iconv-perl) and install via dpkg:

sudo dpkg -i libtext-iconv-perl_1.7-8_amd64.deb 

Source: https://askubuntu.com/a/1166645

Not able to change the Nvidia driver

Driver is stuck on Continue using a manually installed driver.

Reinstall drivers:

sudo ubuntu-drivers install

Source: https://askubuntu.com/a/1237598

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment