Linux Fundamentals

Linux Fundamentals

History

Many events led up to creating of the first Linux kernel and, ultimately, the Linux operating system (OS), starting with the Unix operating system's release by Ken Thompson and Dennis Ritchie (who both worked for AT&T at the time) in 1970. The Berkeley Software Distribution (BSD) was released in 1977, but since it contained the Unix code owned by AT&T, a resulting lawsuit limited the development of BSD. Richard Stallman started the GNU project in 1983. His goal was to create a free Unix-like operating system, and part of his work resulted in the GNU General Public License (GPL) being created. Projects by others over the years failed to result in a working, free kernel that would become widely adopted until the creation of the Linux kernel.

At first, Linux was a personal project started in 1991 by a Finnish student named Linus Torvalds. His goal was to create a new, free operating system kernel. Over the years, the Linux kernel has gone from a small number of files written in C under licensing that prohibited commercial distribution to the latest version with over 23 million source code lines (comments excluded), licensed under the GNU General Public License v2.

Linux is generally considered more secure than other operating systems, and while it has had many kernel vulnerabilities in the past, it is becoming less and less frequent. It is less susceptible to malware than Windows operating systems and is very frequently updated. Linux is also very stable and generally affords very high performance to the end user. However, it can be more difficult for beginners and does not have as many hardware drivers as Windows.

Since Linux is free and open-source, the source code can be modified and distributed commercially or non-commercially by anyone. Linux-based operating systems run on servers, mainframes, desktops, embedded systems such as routers, televisions, video game consoles, and more. The overall Android operating system that runs on smartphones and tablets is based on the Linux kernel, and because of this, Linux is the most widely installed operating system.

Linux is an operating system like Windows, iOS, Android, or macOS. An OS is a software that manages all of the hardware resources associated with our computer. That means that an OS manages the whole communication between software and hardware. Also, there exist many different distributions (distro). It is like a version of the Windows operating system.


Everything is a file

Small, single-purpose programs

Ability to chain programs together to perform complex tasks

Configuration data stored in a text file

Avoid captive user interfaces


Components

ComponentsDescription
BootloaderA piece of code that runs to guide the booting process to start the operating system. Parrot Linux uses the GRUB Bootloader.
OS KernelThe kernel is the main component of an operating system. It manages the resources for the system's I/O devices at the hardware level.
DaemonsBackground services are called "daemons" in Linux. Their purpose is to ensure that key functions such as scheduling, printing, and multimedia are working correctly. These small programs load after we booted or log into the computer.
OS ShellThe operating system shell or the command language interpreter (also known as the command line) is the interface between the OS and the user. This interface allows the user to tell the OS what to do. The most commonly used shells are Bash, Tcsh/Csh, Ksh, Zsh, and Fish.
Graphics serverThis provides a graphical sub-system (server) called "X" or "X-server" that allows graphical programs to run locally or remotely on the X-windowing system.
Window ManagerAlso known as a graphical user interface (GUI). There are many options, including GNOME, KDE, MATE, Unity, and Cinnamon. A desktop environment usually has several applications, including file and web browsers. These allow the user to access and manage the essential and frequently accessed features and services of an operating system.
UtilitiesApplications or utilities are programs that perform particular functions for the user or another program.

File System Hierarchy

The Linux operating system is structured in a tree-like hierarchy and is documented in the Filesystem Hierarchy Standard (FHS). Linux is structured with the following standard top-level directories:

PathDescription
/The top-level directory is the root filesystem and contains all of the files required to boot the operating system before other filesystems are mounted as well as the files required to boot the other filesystems. After boot, all of the other filesystems are mounted at standard mount points as subdirectories of the root.
/binContains essential command binaries.
/bootConsists of the static bootloader, kernel executable, and files required to boot the Linux OS.
/devContains device files to facilitate access to every hardware device attached to the system.
/etcLocal system configuration files. Configuration files for installed applications may be saved here as well.
/homeEach user on the system has a subdirectory here for storage.
/libShared library files that are required for system boot.
/mediaExternal removable media devices such as USB drives are mounted here.
/mntTemporary mount point for regular filesystems.
/optOptional files such as third-party tools can be saved here.
/rootThe home directory for the root user.
/sbinThis directory contains executables used for system administration (binary system files).
/tmpThe operating system and many programs use this directory to store temporary files. This directory is generally cleared upon system boot and may be deleted at other times without any warning.
/usrContains executables, libraries, man files, etc.
/varThis directory contains variable data files such as log files, email inboxes, web application-related files, cron files, and more.

Did you find this article valuable?

Support Tanmaya Tatsat Mahapatra by becoming a sponsor. Any amount is appreciated!