Gnome #

  • For restarting the shell, try in this order (1):
    • Alt + F2 -> r
    • pkill -HUP gnome-shell in another TTY (should not logout the user on X11)
    • systemctl restart gdm (will logout the user)

NFS mounts #

NFS mounts can be tricky. After an NFS request times out, NFS request are retried indefinitely by default. This can lead to unexpected hangs on the client. (1)
Use the mount option soft to limit the number of retries to 3.

If an NFS share hangs, it can be unmounted as follows: Find the mount point using mount and then umount -f -l [mount point] (-f for force and -l for lazy unmount, i.e. detach now and cleanup references later) (2)

Ubuntu #

  • Night light not working correctly: Try killall gsd-color (1) and, if that doesn’t work, follow it by /usr/libexec/gsd-color
  • Analog sound output not appearing: Try pactl load-module module-detect (2)

Grep #

  • Find files not containing a string: grep -L [string] [files] (e.g. grep -L foo *)

Disks #

  • Remove filesystems on a disk: wipefs -a /dev/sd[x] (1)

Shells #

  • Running a command [cmd] that is shadowed by an alias (1), try:
    • \[cmd]
    • command [cmd]
    • '[cmd]' or "[cmd]" #

  • Update cache database of MIME types handled by desktop files: sudo update-desktop-database (1)

Misc #

  • For documenting command line arguments, refer to docopt.
  • Encrypt files with 7zip (will prompt for password): 7z a -p -mhe -t7z [archive_name].7z [filenames...] (1)