This chapter gives a brief overview of Linux, including some reasons for using it as the operating system of choice throughout this book. You can safely skip this chapter if you already know about Linux, or not concerned with the motivation for its use.
Linux is an operating system based on Unix, one of the earlier multi-user operating systems developed in the 1970’s and 1980’s. Unix was originally a single operating system, but over time several commercial variants were developed. These Unix operating systems were particularly popular in the 1980’s and 1990’s, especially within academic and technology organisations. Some of the Internet applications and protocols were first developed on Unix, and hence Unix-based computer systems have a strong link with computer networking.
Today Unix operating systems are still used, mainly in servers and high-end workstations. In the 1990’s Linux appeared, a free operating system with Unix-like functionality (or at least a kernel for an operating system). In the 2000’s, Linux also became popular in typical Unix domains of servers and workstations, and also has been growing in the desktop field (however, in quantity of installs, Linux still does not compare with Microsoft Windows). As with the original Unix, there are many variants, or distributions of Linux, differing in the applications and graphical environments they provide (e.g. Red Hat, Debian, Fedora, Ubuntu, Xandros). We will be using the Ubuntu Linux distribution.
Ubuntu Linux is a free, open-source Unix-based operating system, that has been developed mainly for desktop (and laptop) installations. The aim is to make a user-friendly Linux distribution. It is now one of the more popular Linux distributions.
Why use (Ubuntu) Linux, and not Microsoft Windows, especially since Windows is by far the most popular desktop operating system, and hence very popular with server systems? There are several reasons we will use be using Linux instead of Windows:
In very simple terms, Ubuntu Linux includes:
Linux distributions typically use GNU/Linux, but differ in the set of end-user applications they include (and the version of the Linux kernel and GNU utilities). Ubuntu is one of many Linux distributions. While we will use Ubuntu throughout this book, almost all of the tasks we demonstrate will work equally as well on other Linux distributions. In fact a lot of the commands we cover can be used in Unix operating systems, Berkeley Software Distribution (BSD) variants, and Apple macOS. However we make no attempt to cover other distributions, or to point out the differences.
Ubuntu actually has it’s own variants, and multiple different versions. The two main variants are desktop and server. Both are based on the Linux kernel with GNU utilities, but differ in the set of end-user applications installed. An important difference is that the desktop variant includes a Graphical User Interface (GUI), whereas the server variant does not (it is command line only). In this book we use the server variant, as many of the network and security tasks are intended for servers or devices without monitors. Therefore we make no attempt to demonstrate the Ubuntu GUI or common desktop applications. However, if you already have Ubuntu desktop (or want to try it), you can do almost everything that we do on the server variant.
Ubuntu is updated on a regular basis, with the main schedule being:
In between the releases, security and bug fix updates are provided. So if you install version 18.10, that version will receive updates until April 2019. Beyond that you will either have to upgrade to 19.04, change to 18.04 LTS, or go without security fixes. However if you install 18.04 LTS, that version will receive updates until April 2023.
The instructions in this book have been developed over time, primarily on Ubuntu Server LTS versions. You are highly recommended to use an LTS version, and stick with that for at least 2 years. Don’t be afraid that newer versions are released in the meantime—the non-LTS interim releases are only really useful for testing the latest/greatest features, and due to the short support periods are not suitable for stable systems such as servers.
In summary, if you are getting started on Ubuntu now, use the most recent Ubuntu Server LTS version available.
We assume you have a Windows computer and want/need to run Ubuntu Server (without deleting Windows). You have several approaches available:
If you want to complete all tasks in this book, the best approach is virtualisation, as it is easy to create a network of multiple Linux computers. However if you only need to perform tasks on a single Linux computer, WSL or dual boot are also acceptable (although virtualisation is preferred). The next section introduces the concepts of virtualisation and using Ubuntu Server in VirtualBox.
Virtualisation involves using software to emulate computer and network hardware so that other software can execute as if it is using that emulated hardware (not the real, physical hardware). A common example is with operating systems, where the host operating system is executing on the real computer, while virtualisation software executing on the host OS emulates computer hardware (CPU, disks, network interfaces, etc.). The virtualisation software makes the emulated or virtualised hardware available to another guest operating system. The result: running on OS inside another.
There are different types of virtualisation software, but common applications available to consumers include VMWare, Hyper-V, Parallels and VirtualBox. In this book we use VirtualBox.
Consider a common scenario. You have your own laptop with Microsoft Windows installed as the host operating system. You can only run application software compiled for Windows. You install VirtualBox (the version compiled to run on Windows), which creates a virtual computer within Windows. Now you can install one or more guest operating systems that will use the virtual computer (to be precise, you will have one virtual computer for each guest installed). You may install Ubuntu Linux, so you can now execute Linux applications within VirtualBox, which in turn is running on Windows on your laptop.
Virtualising computer hardware offers many benefits, including:
The main drawback of using virtualisation is performance: software emulation of CPUs, disks and network hardware is much slower than real hardware implementations, and when running multiple guests, that real hardware is shared amongst all (including the host). However with increasing hardware capabilities, virtualisation is a feasible solution for many tasks. You are recommended to use virtualisation for the tasks in this book so you can:
It is this last capability, virtual networking, that is especially beneficial for the tasks we want to perform. To allow you to focus on the tasks, rather than setting up operating systems, installing applications and configuring networks, specialised software, called virtnet, will be used. Chapter 3 describes how to setup and use virtnet.