2.0 Prerequisites
Table of contents
To follow this lesson, you need a working linux system either of the followings:
- A Linux-based system (preferably Ubuntu 22.04)
- Windows users can install WSL (Windows Subsystem Linux), then install Ubuntu 22.04
The commands in this guide are prepared for Ubuntu/Debian-based systems. However, you can easily adapt them to other linux distributions such as RHEL or Centos.
If you are a MS windows user, you need to install WSL2 and Ubuntu 22.04. It is recommended to enable Systemd within your Ubuntu 22.04 on WSL.
To install Ubuntu Linux by default, run the following command in an administrative powershell:
wsl --install
During the installation process, an username and password will be ask. For the password, the characters are not displayed when you type. You must type the password and press enter to complete.
PS C:\Windows\system32> wsl --install Installing: Ubuntu Ubuntu has been installed. Launching Ubuntu... Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: https://aka.ms/wslusers Enter new UNIX username: cass New password: Retype new password: passwd: password updated successfully The operation completed successfully. Installation successful! To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.15.153.1-microsoft-standard-WSL2 x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage This message is shown once a day. To disable it please create the /home/cass/.hushlogin file. cass@unic-cas-cass:~$
Preparation
Update your Linux distribution if you’ve just install it by running the following command:
sudo apt-get update -q && sudo apt-get upgrade -q -y
cass@unic-cass:~$ sudo apt-get update -q && sudo apt-get upgrade -q -y [sudo] password for cass: Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB] Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB] ... Get:42 http://archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f Metadata [116 B] Fetched 32.6 MB in 5s (6139 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... The following packages have been kept back: ubuntu-advantage-tools ubuntu-pro-client-l10n The following packages will be upgraded: apt apt-utils base-files bash bind9-dnsutils bind9-host bind9-libs binutils binutils-common binutils-x86-64-linux-gnu bsdextrautils bsdutils coreutils cpio curl distro-info distro-info-data dpkg eject git git-man iptables irqbalance less libapt-pkg6.0 libbinutils libblkid1 libc-bin libc6 libcryptsetup12 libctf-nobfd0 libctf0 libcurl3-gnutls libcurl4 libexpat1 libglib2.0-0 libglib2.0-bin libglib2.0-data libgnutls30 libip4tc2 libip6tc2 libldap-2.5-0 libldap-common libmount1 libnetplan0 libnghttp2-14 libnss-systemd libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libperl5.34 libpython3.10 libpython3.10-minimal libpython3.10-stdlib libsmartcols1 libsqlite3-0 libssh-4 libssl3 libsystemd0 libudev1 libuuid1 libuv1 libxml2 libxtables12 locales login motd-news-config mount netplan.io openssh-client openssl passwd perl perl-base perl-modules-5.34 python-apt-common python3-apt python3-cryptography python3-distro-info python3-distupgrade python3-software-properties python3-update-manager python3-zipp python3.10 python3.10-minimal snapd software-properties-common systemd systemd-hwe-hwdb systemd-sysv systemd-timesyncd tar tcpdump tzdata ubuntu-minimal ubuntu-release-upgrader-core ubuntu-standard ubuntu-wsl udev update-manager-core util-linux uuid-runtime vim vim-common vim-runtime vim-tiny wget xxd 110 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. Need to get 98.3 MB of archives. After this operation, 1525 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 motd-news-config all 12ubuntu4.6 [4352 B] Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc6 amd64 2.35-0ubuntu3.8 [3235 kB] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 base-files amd64 12ubuntu4.6 [62.5 kB] ... Get:109 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 systemd-hwe-hwdb all 249.11.5 [3228 B] Get:110 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 ubuntu-wsl amd64 1.481.2 [2650 B] Fetched 98.3 MB in 11s (8823 kB/s) Extracting templates from packages: 100% Preconfiguring packages ... (Reading database ... 24208 files and directories currently installed.) Preparing to unpack .../motd-news-config_12ubuntu4.6_all.deb ... Unpacking motd-news-config (12ubuntu4.6) over (12ubuntu4.4) ... ... Unpacking systemd-hwe-hwdb (249.11.5) over (249.11.3) ... Preparing to unpack .../54-ubuntu-wsl_1.481.2_amd64.deb ... Unpacking ubuntu-wsl (1.481.2) over (1.481.1) ... Setting up libip4tc2:amd64 (1.8.7-1ubuntu5.2) ... Setting up libexpat1:amd64 (2.4.7-1ubuntu0.3) ... ... Setting up python3-distupgrade (1:22.04.19) ... Setting up ubuntu-release-upgrader-core (1:22.04.19) ... Setting up update-manager-core (1:22.04.20) ... Processing triggers for install-info (6.8-4build1) ... Processing triggers for libc-bin (2.35-0ubuntu3.8) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for plymouth-theme-ubuntu-text (0.9.5+git20211018-1ubuntu3) ... Processing triggers for dbus (1.12.20-2ubuntu4.1) ... cass@unic-cass:~$
In this guide, we will use gedit
as the default editor because it’s easy to use. If your system does not have it yet, you can install it using the following command:
sudo apt-get install gedit python3-pip -y
cass@unic-cass:~$ sudo apt-get install gedit -y Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: adwaita-icon-theme alsa-topology-conf alsa-ucm-conf aspell aspell-en at-spi2-core ... zenity zenity-common Suggested packages: aspell-doc spellutils wordlist docbook docbook-dsssl docbook-xsl ... yelp yelp-xsl zenity zenity-common 0 upgraded, 222 newly installed, 0 to remove and 2 not upgraded. Need to get 107 MB of archives. After this operation, 429 MB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 sgml-base all 1.30 [12.5 kB] Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 hicolor-icon-theme all 0.17-2 [9976 B] ... Get:221 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 zenity-common all 3.42.1-0ubuntu1 [276 kB] Get:222 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 zenity amd64 3.42.1-0ubuntu1 [67.3 kB] Fetched 107 MB in 18s (6028 kB/s) Extracting templates from packages: 100% Preconfiguring packages ... Selecting previously unselected package sgml-base. (Reading database ... 24207 files and directories currently installed.) Preparing to unpack .../000-sgml-base_1.30_all.deb ... Unpacking sgml-base (1.30) ... Selecting previously unselected package hicolor-icon-theme. Preparing to unpack .../001-hicolor-icon-theme_0.17-2_all.deb ... ... Setting up docbook-xml (4.5-11) ... Processing triggers for dictionaries-common (1.28.14) ... aspell-autobuildhash: processing: en [en-common]. ... aspell-autobuildhash: processing: en [en_US-wo_accents-only]. Processing triggers for libgdk-pixbuf-2.0-0:amd64 (2.42.8+dfsg-1ubuntu0.3) ... Processing triggers for libc-bin (2.35-0ubuntu3.8) ... Processing triggers for sgml-base (1.30) ... cass@unic-cass:~$