4.1 Installing Ubuntu
There are many distributions available for GNU/Linux. We concentrate on Ubuntu, a derivative of Debian. Ubuntu has a focus on ease of setup and is widely deployed. It often replaces Windows, or is installed beside Windows (dual boot), or within Windows using the Windows Subsystem for Linux (WSL). It can also be installed on virtual machines locally or in the cloud. Canonical’s Ubuntu Installation Tutorial provides simple instructions. Always start with the latest Ubuntu LTS (Long Term Supported) version and become familiar with the installation process by trying it out once or twice—it doesn’t hurt to practise!
Once you have Ubuntu installed you might like to install wajig to simplify the administration of a Ubuntu system. Wajig is available from the PyPI software repository. Installation of wajig will usually take less than 5 minutes and provides the command wajig.
sudo apt --yes update; sudo apt --yes upgrade sudo apt --yes install wajig wajig update; wajig upgrade wajig install python3-pip pip install wajig wajig --version
wajig command is not found you may need to log out and log
back in for the system to refresh the PATH to include
(where pip installs commands). You could do the
following, but it is not usually required:
echo 'PATH=~/.local/bin:$PATH' >> ~/.bashrc
If you will access the Ubuntu server in the cloud or even on your local network, then a remote desktop connection can be established using x2go as an alternative to a command line ssh connection. X2Go usually requires the mate desktop and the x2go server to be installed on the remote. This might take about 15 minutes:
wajig install ubuntu-mate-desktop x2goserver
For any questions asked during the install select the default option (e.g., gdm3 display manager).
In general, you may also like to install emacs, most, snapd, pwgen and brave:
wajig install emacs most snapd pwgen sudo snap install brave
Some other useful initial setup includes setting the timezone if required:
sudo timedatectl set-timezone Australia/Canberra
To keep the system automatically updated add a regular task to the system crontab.
sudo crontab -e
Then add the following line to update the system automatically at 3am
every day. Be sure to change
kt to your own username, or even
the whole path to another existent location.
0 3 * * * (wajig update; wajig distupgrade --yes) > /home/kt/cronlog/cronlog_`date +\%Y\%m\%d`.log 2>&1
Be sure to create the required sub-directory for the log files in your home directory:
Now, you probably want to add some users (see wajig’s adduser) or perhaps install a web server (see Section 94.1 for Apache or Section 94.3 for Caddy). Perhaps this is to be a Solid server in which case see Chapter 79.
Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0