Ubuntu checklist

This is my checklist (in progress) for installing Ubuntu.

The important thing for me right now is to get it all in one place; I’ll make it pretty and presentable later.  See also the All Things Ansible page for hopefully automating some of this stuff.


Ubuntu in a VM
Install the distribution
Make sure the network adapter is enabled and in bridged mode

Before installing guest additions make sure to install the following packages:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ssh net-tools
sudo apt-get install build-essential gcc make perl dkms linux-headers-$(uname -r)

and then reboot and install the guest additions.

Make df output more friendly by creating a system-wide alias for it:

echo "alias df='df -h -x squashfs -x tmpfs -x devtmpfs'" >> /etc/profile.d/aliases.sh

Make sure to set the “always_set_home” variable in the sudoers file (using visudo)

Disable IPv6:

The recommend method to disable IPv6 on Ubuntu 18.04 after reboot is to configure the GRUB boot loader to pass kernel parameter during the boot time.

To do so open the /etc/default/grub using your favorite text editor with root privileges and change/add:


Once you have made the above change within the /etc/default/grub file execute the following commands to apply the GRUB changes:

$ sudo update-grub

To enable automatic software updates:

Reference this guide

To install Samba:

sudo apt-get install samba cifs-utils

To install NFS:

sudo apt-get install nfs-common nfs-kernel-server

To install mysql:

sudo apt install mysql-server
sudo mysql_secure_installation

Installing apache and php

sudo apt update
sudo apt install apache2 php libapache2-mod-php php-mysql php-gd php-xml phpmyadmin php-mbstring php-gettext

Install phpmyadmin

Reference this guide.

To install Plex Media Server:

Plex Media Server installation

To enable Web Service Discovery (so non-Windows machines are viewable in the “Network” section of Windows Explorer on Win10):

Reference this page.

Helpful Web Pages

Helpful page #1

Enable NFS

Finally!  The solution to get the “right” VNC setup

Ubuntu 18.04 switched from LightDM to GDM3. Connecting to the login screen with VNC while using GDM3 is currently not possible. The easiest way to get this VNC functionality back is to simply switch back from GDM3 to LightDM.

LightDM is still being actively developed and used by many Linux distributions including some other flavors of Ubuntu. So no worries there.

Install LightDM

apt install lightdm

Should you for some reason come to regret switching to LightDM:

dpkg-reconfigure gdm3

Once you have LightDM installed and configured as your default greeter..

Install x11vnc from packages

apt install x11vnc

Create the file /lib/systemd/system/x11vnc.service

# Description: Custom Service Unit file
# File: /lib/systemd/system/x11vnc.service

ExecStart=/usr/bin/x11vnc -loop -nopw -shared -xkb -repeat -noxrecord -noxfixes -noxdamage -forever -rfbport 5900 -display :0 -auth guess
ExecStop=/usr/bin/killall x11vnc


Set the x11vnc service to automatically start at boot

 systemctl enable x11vnc.service

Start the x11vnc service

 systemctl start x11vnc.service

This assumes screen :0 represents your monitor and binds x11vnc to that monitor instead of a session. If you do not have a monitor (headless) I believe it is possible to install a fake monitor driver and bind x11vnc to that.

Side notes

  1. Incase you are using virt-manager (which also enables VNC on you may want to bind x11vnc to your LAN IP (-listen
  2. The parameters used to start x11vnc tell it not to ask for an additional password (-nopw)

Lets Encrypt/OpenVPN information

Let’s Encrypt HTTPS Certificates for OpenVPN AS (Access Server)

Installing Let’s Encrypt SSL Certs

Customizing the MOTD

Put any customization data into /etc/motd

User profile changes

  • If desired, disable the screen saver lock and screen blanking (see below)

Helpful Commands/Other things to document

List processes and which ports they have open (must be done with sudo):
sudo netstat -ltnp

Listing all installed packages
apt list –installed

List installed packages
sudo apt list –installed

Find out what package installed a specific file
sudo dpkg -S <file>

Searching for available packages
apt-cache search <keyword>

Changing default editor for visudo
sudo update-alternatives –config editor

Disable screen lock
Settings -> Privacy -> Screen Lock

Disable screen blanking
Settings -> Power -> Blank Screen

Create Samba User
smbpasswd -a <username>

View Samba Users
Use pdbedit

Add domains to the DNS Search Suffix list
Edit /etc/systemd/resolved.conf and add domains after Domains=

Finding largest files/directories
du -a /dir/ | sort -n -r | head -n 20 (replace 20 with the # of lines you wish to have returned)

Disable colors in the vi editor by default
Create (or edit, if it exists) ~/.vimrc; into this file add the command syntax off, and save the file.

Overwrite the boot block on the hard drive (ONLY when you want to re-install the operating system!)
dd if=/dev/zero of=/dev/sda count=1 bs=512

Method to determine space utilization on root partition only

mkdir /tmp/rootbind
mount --bind / /tmp/rootbind
du -d 1 -h /tmp/rootbind

Reading a binary zone file from Bind

named-compilezone -f raw -F text -o   

A way to determine when a system was installed

sudo tune2fs -l <partition> | grep created

Will display the date the file system was created (which, logically, should be the install date of the system).