Table of Contents

Systems - Media Server - Install Ubuntu Server

It is recommended to install a Long-Term Support (LTS) release of Ubuntu.


Steps


ALERT: To prevent accidentally installing Ubuntu on the wrong drive and overwriting data it is recommended to disconnect data drives during installation.


Set a static IP

Subnet:          192.168.1.0/24
Address:         192.168.1.85
Gateway:         192.168.1.1
Name Servers:    192.168.1.1, 192.168.1.50
Search Domains:  <blank>

Update

sudo apt update && sudo apt upgrade -y

Clean up

sudo apt autoremove
sudo apt clean
sudo reboot

NOTE: This removes any unnecessary packages and cleans up the apt cache.


Change the default shell to bash

By default, Ubuntu has Dash as the default shell.

ls -al /bin/sh

returns:

lrwxrwxrwx 1 root root 4 Mar 31  2024 /bin/sh -> dash

NOTE: This shows that /bin/sh links to dash.


sudo ln -sf bash /bin/sh

ls -al /bin/sh

returns:

lrwxrwxrwx 1 root root 4 May 30 15:15 /bin/sh -> bash

NOTE: This shows that /bin/sh now links to bash.

  • On older Ubuntu systems the following could be used, but this no longer works on new versions:
    sudo dpkg-reconfigure dash
  • When asked Install dash as /bin/sh? specify No.

Update inputrc

Update /etc/inputrc to support being able to use arrow keys for history searches.

Add the following lines to the bottom of the file.

/etc/inputrc
...
# Peter added these
"\e0A": history-search-backward
"\e0B": history-search-forward
"\e0C": forward-char
"\e0D": backward-char
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char

NOTE: This allows one to type the first letter of a previous command, and then by using the arrow up key for example, will only show previous commands also starting with that letter.


Remove snap if installed

List all installed Snap packages

snap list

Remove all the Snap packages

sudo snap remove <package_name>

Purge snapd

sudo apt purge snapd

NOTE: Clean up any remaining directories.


Set the timezone

sudo dpkg-reconfigure tzdata

NOTE: Select the appropriate location.


References

https://ubuntu.com/tutorials/create-a-usb-stick-on-ubuntu#1-overview

https://ubuntu.com/tutorials/install-ubuntu-server#1-overview

https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview