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.


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

To install Plex Media Server:

Plex Media Server installation

Helpful commands:

View video resolution capabilities – xrandr -q
List installed packages – sudo apt list –installed

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

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.

 systemctl start x11vnc.service

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

Installing apache and php

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

Install phpmyadmin

Reference this guide.

User profile changes

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


Other things to document

Reload systemd manager configuration after changes made
systemctl daemon-reload

Listing all installed packages
apt list –installed

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>

Determine the date the system was installed
tune2fs -l /dev/vda2 | grep ‘Filesystem created:’ (replace vda2 with device where root filesystem is located)

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

Find files consuming the root file system

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

Install VirtualBox Guest Additions on Ubuntu via command line

On the Guest console, select “Devices -> Insert Guest Additions CD Image”.
From the command line of the guest, perform the following commands (in a privileged shell):

mount /dev/cdrom /mnt
cd /mnt
sh ./VBoxLinuxAdditions.run --nox11

Linux hosts aren’t visible in the “Network Neighborhood” on Windows machines

The solution for this issue (installing/enabling the Windows Services for Devices Daemon (WSDD)) can be viewed here.

Installing Portainer to manage Docker containers

sudo docker run -d -p 9443:9443 -p 8000:8000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest