Installing Linux
Today, I took some of the first tangible steps into the world of Computer Science: with the help of my brother, I installed Linux on my old Laptop.
More precisely, we installed the Linux Mint (I use my current laptop for my work as a lawyer, and hence, it was not a good idea to install Linux there, as it could wipe out my existing data and/or otherwise interfere with my work). In the course of the installation process, I understood what a ‘bootable drive’ really means. But for that to understand, it was important to appreciate that the term ‘booting’ meant the process of starting a computer. After a computer is switched off, its main memory (the RAM) loses the files containing its operating system, as it is a volatile memory. Thus, during the booting process, the first thing that the CPU does is to load the ‘kernel’ (see below) of the operating system in its main memory. The program which initiates this process is called a ‘boot loader’ and the ‘Master Boot Record’ (MBR) tells the CPU where to find this boot loader. Thus, at the time of switching on a computer, the CPU hunts for the MBR, which is, basically, a pointer (like, a shortcut for files on Windows) that helps the BIOS to locate the boot loader which in turn loads the relevant parts of the operating system onto the RAM. Interestingly, there is a predetermined hierarchy which the processor would follow while hunting down the MBR. Typically, it would search for the MBR file on the computer’s own hard-drive before moving on to other drives (like flash-drives or CD-ROMs). This was important to know, as we were trying to install Linux using a Flash-drive (onto which an ISO file containing the Linux Mint was written). Thus, to prevent the BIOS from booting Windows 10 that was already installed onto its hard-drive, we pressed ‘Esc’ right after switching it on. This allowed us to change the said hierarchy, such that the next time the laptop was switched on, it would first search for an MBR on the flash drive. In this manner, we could ensure that the Laptop booted Linux Mint from the flash drive itself. Next, we needed to install Linux Mint on the harddrive of my laptop itself. To do this, we needed to wipe out all existing memory on the hard-drive.
After Linux was installed, I was introduced to the world of ‘Command Line interface’ of Linux. I was amazed to learn that one had to write specific commands to open specific folders or ‘directories’ in the filing System. Even more amazingly, one had to write specific commands to install and update software. I am sure, for performing most other functions, one has to rely on the CLI. In the process of installing some of the essential softwares, I learnt the following:
-
Kernels: The core component of every operating system is called a ‘kernel’. Every Operating System will have its kernel. It is the first part of the Operating System that is loaded on the main memory at the time of booting and it remains there throughout the time the computer is switched on. The kernel facilitates interactions between programs installed in a computer and its hardware components. Primarily, it performs the following key tasks:
-
memory management: multiple programs will want to utilise parts of the main memory and it may very well happen that the demand for memory surpasses the available memory in the computer at a given time; the kernel will act as a traffic police-person, to navigate and prioritise which programs should get access to the memory of the computer and in what order.
-
process management: In a similar manner, kernels also manage the manner in which the CPU should execute processes, for executing programs.
-
device management: Kernels also act as a bridge between programs which require access to various Input-output components of the computer.
Thus, in a nut-shell, the kernel is “responsible for managing the systems resources and allocating them to applications.”
-
-
Linux Mint: In 1991, Linus Torvalds had developed the kernel for Linux. A ‘Linux distribution’ is a complete operating system based on the Linux kernel. ‘Debian’ is a one such Linux distribution, which is developed and maintained by the Debian Project. It is free and open-source. Now, Ubuntu is yet another operating system, which is built on top of the Debian operating system. Linux Mint is, in turn, an operating system which is based on Ubuntu (which is based on Debian) and is bundled with certain useful applications. It is aimed to produce a “modern, elegant and comfortable operating system which is both powerful and easy to use”.
-
sudo: the command ‘sudo’ (which sounds awfully similar to ‘pseudo’, as in, ‘pseudo-intellectual’) which stands for ‘super user do’. It is probably one of the most powerful commands in Linux’s Command Line Interface. It gives you administrative privileges and allows you to do things to your computer, including installing softwares, updating and upgrading existing softwares, that other lesser-privileged users are not allowed to do.
-
Packages and Repositories: Linux repositories are online resources that contain a list of important updates for the Operating System and other essential softwares, called ‘packages’. There can be official repositories and third-party repositories to install and update packages from. ‘Packages’ are a list of files that are necessary for running a software: it is the equivalent of ‘.exe’ files on Windows. Packages are also used to install drivers to the computer.
-
Package managers: It turns out that hitherto simple tasks like ‘installing’ and ‘updating’ softwares, require a series of multiple steps. For example, most programs are ‘dependent’ on other programs, and, thus, to properly run program A (which is built on the basis of a more essential Program X), you need to also have Program X installed on your system. Further, it is important to ensure that the program that you see on the internet is authentic and genuine. Initially, most of these tasks used to be done manually by the user, which, I can imagine, must have been a painstaking process. For uninstalling a program, if you uninstalled a third program on which this program was dependent on, it may result in another program malfunctioning, as the latter may also be dependent on that third program. To automate these functions, and make the process of installation, authentication, updation and uninstallation of programs more seamless and automated, a command called ‘apt’—which stands for Advanced Packaging Tool—was introduced in the past. Thus, the command ‘sudo apt update’ allows the user to know if any existing ‘package’ installed in the system needs to be updated. This is done by checking with the versions of the corresponding packages on their respective repositories.