You are here

Ubuntu

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]
Topic: 

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
Topic: 

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"
EndSection

You may have to reboot at this point

Topic: 

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:

Topic: 

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

Topic: 

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 58.245.23.126/24 -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:
Topic: 

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. server.example.org
vi /etc/hosts         # ensure it contains the line: 127.0.1.1 server.example.org
vi /etc/idmapd.conf   # ensure it contains the line: Domain = example.org (not the name of the server but the domain)
hostnamectl set-hostname server.example.org
#pre sytemed edit /etc/hostname manually, and also run hostname server.example.org
Topic: 

Installing libsass on Ubuntu

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

Topic: 

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:

Topic: 

Pages

Subscribe to RSS - Ubuntu