You are here


Technical Notes

These notes are my personal online notebook of useful commands and "how-to's". You are welcome to make use of them if you find them helpful. They obviously don't come with any warranty! Click on one of the category tags above for the notes in any category.

ubuntu packages can be upgraded. Run apt list --upgradable

apt list --upgradable

Then (if desired) they can be upgraded one at a time with:

apt install --only-upgrade [packagename]

Unsnap Firefox

Five Steps

sudo snap remove firefox

sudo add-apt-repository ppa:mozillateam/ppa

echo '
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
' | sudo tee /etc/apt/preferences.d/mozilla-firefox

echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox

sudo apt install -y --allow-downgrades firefox
sudo dpkg-reconfigure unattended-upgrades    #And answer NO

Preventing false mouse double-clicks under linux

Newer versions of Kubuntu are missing the advanced mouse options which let you debounce the mouse

sudo apt install xserver-xorg-input-evdev
sudo mkdir -p /etc/X11/xorg.conf.d

Then edit /etc/X11/xorg.conf.d/xorg.conf

and append:

Section "InputClass"
    Identifier "evdev-mouse"
    MatchIsPointer "yes"
    Driver "evdev"

You may have to reboot at this point


Fixing a Linux broken boot

If the system has been corrupted, and there is no grub menu, then boot from a live CD, open a terminal and do this:


Wiping a Hard Drive Clean

To securely wipe a hard drive of all data, do:

apt install wipe
shred -vfz -n 2 /dev/sdb
  • Options above are verbose, force, zero out in an extra pass
  • Number of passes: -n 2

An alternative “light” way of doing this is to simply copy random bytes


iptables configuration on a linux server

  • List current tables with line numbers and stats
iptables -L INPUT --line-numbers -v
  • Append another rule
iptables -A INPUT -s -j DROP
  • Delete rule #3
iptables -D INPUT 3
  • The moment you apply IPTABLE rule it immediately becomes active.But it will not survive a reboot.
  • To be able to survive IPTABLES a reboot in your network configuration file /etc/network/interfaces file (referring to a Debian/Ubuntu system) you need to add:

Setting up NFS on Ubuntu 16.04

Make sure userid’s and groupid’s match between the systems

  • e.g. usermod -u 1001 -g 504 -c "Andrew Fountain" andrewf

Set up the server

  • set up the fully qualified domain name, e.g.
vi /etc/hosts         # ensure it contains the line:
vi /etc/idmapd.conf   # ensure it contains the line: Domain = (not the name of the server but the domain)
hostnamectl set-hostname
#pre sytemed edit /etc/hostname manually, and also run hostname

Installing libsass on Ubuntu

The most minimal way of doing an installation is using sassc, the C binding.


Install php 5.6 on Ubuntu 16.04

By default Ubuntu 16.04 (Xenial) now comes with php 7.0

You can install php 5.6 in parallel and switch between them using the following instructions:



Subscribe to RSS - Ubuntu