Making Linux Home

| ⌛ 13 minutes read

📋 Tags: Linux Tutorial Essay


Linux 🐧 - A Tasty Introduction

Are you tired of having useless, suspicious 👀 bloatware being installed on your computer?

Are you looking for a more secure and stable machine out-of-the-box?

Are you a developer that wants to be in better control of your machine?

Perhaps Linux is for you.

What’s Linux?

Linux refers to the family of Operating Systems (OS) that use the open-source Linux kernel. It may seem like a niche OS, but Linux plays a much larger role in your daily life than you might expect.

Cloud services like Google Drive are hosted by Linux Servers. Your browser is likely communicating with a Linux server by accessing this site. If you use an Android phone, you’re actively using a modified version of the Linux kernel!

A World of Flavours 🍦

The variants of Linux OS are endearingly called flavours within the Linux community. These flavours mainly differ in the UI software they use, package managers, and what pre-installed software are included.

So, for a lack of a more convenient analogy, we can think of Linux distributions as Ice-Cream flavours.

First, we have the ‘basic’ options. Think about Vanilla & Chocolate - these flavours prioritise stability (Debian, Ubuntu). These are the more foundational flavours that many other distributions of Linux build off on. They often have better hardware driver support available.

There’s also the more accessible and ‘fun’ flavours. Think Choco-Mint and Cookie Dough - some flavours prioritise user experience and are tailored towards various needs, such as better support for NVIDIA GPUs, videogames and more (Linux Mint, Pop!_OS).

There’s also the spanking-new flavours. These flavours focus on providing ‘bleeding edge’ updates (Arch-Linux, Manjaro). They are more suited for experienced users who know how to troubleshoot. Be warned that for these kinds of flavours, the installation process is more hands on (you will need to do more things on the command line). Do check if your preferred flavour has any dedicated installer or any special install instructions. Arch-Linux, for example, does not come with any GUI installer or any GUI software out of the box. By virtue of them being at the forefront of implementing new OS/Kernel updates, they may be less stable than other flavours.

You can also try out the flavours more widely used by industry, such as CentOS and Red Hat.

These are just a sample of literally hundreds of flavours out there. It’s really up to your taste on which Linux distro works best for you.

If choosing a flavour is too overwhelming, there’s no harm in jumping into the stabler, more accessible options and slowly developing your taste from there. No matter what flavour you end up choosing, compared to other propietary OSes out there, Linux tends to be more lightweight, secure and stable 👍.

Installing Linux

If you can install any piece of software (s/a videogames) on a Windows or MacOS machine, you can install Linux. You don’t need much technical know-how, especially with the more popular flavors having a user-friendly installer that takes care of the work for you. It can be as simple as plugging in a USB and clicking next, next, next…

Generally speaking, all you need to do is download your Linux flavour, flash it onto a USB, boot your PC from it and follow the installer instructions from there.

If you’re new to Linux, chances are that you’d want to dual-boot with Windows as a form of safety net. However, setting up dual-boot can be a little confusing and error-prone compared to only hosting Linux. If you want to hop between various OS-es or want to know how not to accidentally brick your computer, the next section may be worth a quick read.

A Quick Primer on Starting Up an OS

Knowing how a computer boots up & loads your OS can help with troubleshooting and pinpointing what went wrong during your install. The following is a brief,1 (over)simplified explanation on how a computer loads your OS and where things may go wrong.

To boot up an OS, you need 3 components:

  1. The Firmware
    This software is known as either ‘BIOS’ or ‘UEFI’, stored on your motherboard’s ROM. To enter the BIOS/UEFI menu, you need to spam f12 (manufacturer specific) during boot-up.

    The firmware primarily does two things. First, it performs hardware checks to ensure that your computer does not explode. Second, it looks for bootloaders to load the OS. We are concerned with the 2nd function when installing Linux.

    The firmware finds bootloaders based on the hard drives connected to the computer. For every hard drive, it tries to find a bootloader in it. It then chooses which bootloader to start based on the ‘boot order’.

  2. The Partition Table
    This is your Master Boot Record (MBR) or GUID Partition Table (GPT).

    It is stored at the start of your hard disk and acts as a floorplan/map of the disk, telling the firmware where to find the bootloader.

  3. The Bootloader
    Bootloaders are software to load your OS. They can be proprietary (Windows Bootloader) or open-source (GRUB/Systemd-Boot). Installing Linux usually installs an open source bootloader for you. If you are using MBR, the bootloader is ‘embedded’ inside it. If you are using GPT, the bootloader is stored inside the EFI System Partition (ESP).2

    Bootloaders start up the OS. If multiple OSes are present on that harddisk, it gives you a menu to select which one to load up.

For your OS to load:

The firmware looks for all the connected hard drives on your computer. After that, it checks each hard drive’s floorplan (partition table) for a bootloader. It tries to start each bootloader based on the boot order, and then the bootloader loads your OS.

When you install a new OS:

You dedicate a portion of your hard drive to the new OS, and update the partition table + bootloader on where to load your new OS.

If something goes wrong after installation, it’s because one or more or all 3 components are not working properly during the OS loading process.

Some common issues:

Cannot access the older OS/Windows?

You might’ve overwritten your bootloader in the floorplan of your hard drive (GPT/MBR). If you want to run multiple OSes on the same hard disk, there is a risk that while installing the OS, the previous bootloader will be overwritten and you may be locked out of your older OS. This is especially the case if the OS uses a proprietary bootloader. Many guides are available online on how to restore the bootloader, BUT to avoid such problems, it’s best to dedicate a seperate hard drive to your Linux flavour if your can afford it. This ensures that the original hard drive’s OS record in the floorplan (GPT/MBR) does not get overwritten.

Cannot boot from USB? Disable secure boot.

UEFI has a neat feature called Secure Boot. It prevents tampering of the firmware & bootloaders by checking the software’s digital signature. However, most Linux flavours are not signed and do not support secure boot. You will likely need to disable secure boot in the UEFI menu.

Demo: Installing POP!_OS 💻

Now, the fun part (for me) - actually installing Linux. To give you a rough feel of what installing Linux actually looks like, in this section I talk about the installation step-by-step process with pictures.

I was lucky to be just-in-time for the newest release of POP!_OS (21.04) when I got my new laptop. I chose POP!_OS as it’s easier to install, has great out-of-the-box support for NVIDIA GPUs and a fluid user interface. I installed POP!_OS to dual-boot with Windows on a seperate hard drive.

STEP 1: Preparing the USB

The POP!_OS official website has good documentation on this. I downloaded POP!_OS from the official website and flashed it to a USB so that it can be booted from. This can be done with Balena Etcher, as recommended by the official website at the time of writing.

STEP 2: Backup Your Data & Pre-empt Problems

Backup all your data on all of your drives, unless you are OK with losing data. It’s also a good idea to google around and see if anyone that installed Linux on the same hardware as you had any issues and how they solved it.

STEP 3: Prepping the Firmware Settings (UEFI/BIOS)

Its always good to check if your PC manufacturer has any specific documentation on UEFI/BIOS-specific settings that need to be configured to install Linux. In my case, I just needed to disable Secure Boot via the UEFI firmware.

Disabling Secure Boot via UEFI Config

STEP 4: Booting from USB

Once the relevant firmware config is done, I plugged in the POP!_OS flashed USB stick and rebooted my laptop. Entering the UEFI boot menu, I found the ‘boot from USB’ option and clicked it.

Booting from USB (Option 4)

STEP 5: Entering the Installer

At this stage the computer is booting POP!_OS from the USB. After a short while of loading, I’m presented with a login screen. Entering it, I’m given a desktop environment with the Installer wizard open as shown in the image below. At this point, I just need to follow the installer instructions to setup some settings like keyboard and language before entering the install stage.

The Installer Screen

STEP 6: Partitioning and Drive Choosing

Once I’m done with some initial setup, I’m shown options to clean install or custom install. Unless you intend on having multiple OS-es on the same disk or are particular about the partition sizing (e.g. you want less swap), you are better off doing a clean install.

Installation Stage

If you are interested in customising your partitions, you need at least 3 partitions for Linux.

  • /boot’ at the start with at least 550MB for bootloader related information
  • /’ used as the main memory block
  • /swap’ that acts as virtual RAM
Example Partition Format

By default (clean install), the POP!_OS installer will allocate 4GB for Swap, 500MB for boot and 4GB for recovery.

Since I want to dedicate one hard disk to Linux, I chose to install on the disk that does not have Windows on it (your D: drive equivalent).

Choosing a Disk to Install

After clicking ‘erase and install’, just wait for the install to finish. After that, reboot your computer and unplug the USB. When I opened up the UEFI Boot Menu after the install, as expected, POP_OS shows up. A successful install!

POP!_OS Now on the Boot Menu

STEP 7: Changing the Boot Order

I mentioned earlier about how the firmware chooses what bootloader to start based on the ‘boot order’ setting. On your UEFI, you should be able to find this boot order in the UEFI menu and change it to your preference. I want to use Linux as my primary OS, so I made POP!_OS the first to be booted.

POP!_OS as the First Pick

Making Linux Cozier ⛱️

The great thing about Linux is that out-of-the-box, you don’t need to do much to make it secure. You will probably want to update all the pre-installed packages, though.

0
1
$ sudo apt-get update
$ sudo apt-get upgrade

Below are some of my suggestions to make the Linux experience cozy, productive, and your new primary OS.

Hardware Drivers 💾

Test out all of your hardware components - Wifi, Bluetooth, USB and GPU drivers. If they don’t work, you may need to install hardware drivers for them.

For NVIDIA drivers, you have the option of open-source and closed-source from NVIDIA themselves.

Firewall Config 🧱

Unless you plan on installing tons of software via shady links on the wild web, you don’t really need an antivirus. But what you DO need is a firewall. There are many open-source Linux firewalls out there. The one that came packaged in POP!_OS is the Uncomplicated Firewall, ufw.

You can access ufw via the terminal/command line, and enable it using sudo ufw enable. There’s also the option of a GUI variant of ufw called gufw that makes wrapping your head around configuring your firewall easier. For most cases, the ‘Home’ profile in ufw or gufw should be sufficient.

Productivity Tools

Most software tools on Windows either can be emulated on Linux or have a Linux variant. Here are some variants of common tools you may need.

  • Powerpoint, Word and Excel -> LibreOffice
  • Photoshop -> GIMP
  • Paint -> Tuxpaint
  • MP4 MP3 player -> vlc

Terminal Decorating 🐚

Did you know you can customise your terminal?3 There are many customizable options out there, like modifying the base color, transparency, font, etc.

You can also consider using the fish shell, an alternative to Bash that’s designed to be more user-friendly. It features live autocomplete suggestions, syntax highlighting and more.

Ricing 🍚

The User Interface software that gets bundled with your Linux flavour are usually Desktop Managers like GNOME or (Static) Window Managers like AwesomeWM, i3wm.

The great thing about Linux is that since virtually all of these are open-source, they are highly customizable and programmable. There are tons of community plugins and projects out there you can use to ‘rice’ your setup, as the community terms it. If you want to, you can change your Desktop Manager/Window Manager!

Try heading down to reddit’s r/unixporn. There are really aesthetic projects and setups out there that can even rival wallpaper engine on windows.

If you are using the GNOME desktop manager (Debian & Ubuntu variants), there’s tons of QOL widgets and plugins for your environment over at their extensions page.

Quality of Life Extras

Media Formats

Some media codecs/formats such as mp3, mp4 & quicktime may not come installed with your Linux flavour due to patenting issues. The repository/link to install the codec depend on your flavour, but for Ubuntu based distros like POP, you can get them by running:

0
 $ sudo apt-get install ubuntu-restricted-extras

Running Windows Software

Need to use software that’s only compatible with Windows? Try installing wine and running your Windows software with it.

Automating with Cronjobs

You may also find it necessary to automate certain regular tasks. Consider using cron. It is an common Linux daemon that helps you execute bash commands at regular intervals. You just need to add job entries via crontab where you will have to specify the time interval and what commands to run.

For example, let’s say I want to run webscraper.py every weekday at 1.45am at the root directory. I would run these commands…

0
1
$ crontab -e my_username  
45 1 * *  1,2,3,4,5 python3 webscraper.py

If you’re interested in understanding more about what the asterisks and numbers mean, take a look at this. Take note that cron jobs run as root in the root directory, and you will likely need to change the directory to access files further down the directory.

Go Try Linux!

From command-line bonzai trees, graphing calculators, to command-line spotify, there’s tons of projects out there that can spice up your desktop environment and make you feel right at home.

Hopefully I showed you that moving to Linux isn’t that hard. If you’re looking for a fresh start, a stabler computer and more, give Linux a try!


  1. For more in-depth reading, the ArchLinux wiki is a good place for a deep dive. ↩︎

  2. This is why if you are using UEFI-GPT, you will need to dedicate a section of your hard disk as the ESP if you don’t already have one. ↩︎

  3. Fun fact: You can actually customize how your windows command line/powershell looks like too! Right click the top of the window and navigate to properties. ↩︎