Linux Fundamentals
Hi Guys, I am starting a new series where I will upload 1 story each day about Linux Fundamentals, So stay tuned to learn the most remarkable OS in the world, At least in my opinion, So without further ado let’s hop into it, shall we?
Today's topic is Linux Structure and a bit of History as well.
So just a little History via some pointers:
- Linux OS, starting with the Unix operating system released by Ken Thompson and Dennis Ritchie (both worked for AT&T) 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 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 creation of the GNU General Public License (GPL).
- 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, licensed under the GNU General Purpose License v2.
Here are a few more facts about Linux
- Linux is available in over 600 distributions (OS based on Linux Kernel and supporting software and libraries)
eg: Ubuntu, Debian, Fedora, OpenSUSE, elementary, Manjara, Gentoo Linux,
Redhat, and Linux Mint - Linux is — more secure than other OS
- less susceptible to malware than Win OS
- very frequently updated
- very stable and generally affords very high performance to the end-user
- free and open-source
OS: It is software that manages all hardware resources associated with our computer, Meaning OS manages communication between software and hardware
Philosophy
Linux follows 5 core principles
- Everything is a file: all config files for the various services running are stored in one or more .txt files
- Small, single-purpose programs: tools can be combined to work together
- Ability to chain programs together to perform complex tasks: such as processing or filtering specific data results
- Avoid captive user interfaces: Linux is designed to work mainly with the shell for greater control
- Configuration data stored in a text file: an example of such a file is the /etc/passwd file, which stores all users registered on the system
Compon3nts
- Bootloader: a piece of code that runs to guide the booting process. Parrot OS uses the GRUB Bootloader
- OS Kernel: The kernel is the main component of an OS. It manages the resources for sys. I/O devices at the hardware level
- Daemons: Background services are called “daemons” in Linux. Their purpose is to ensure that critical functions such as scheduling, printing, and multimedia are working properly, these small programs are loaded after we booted or log into the computer
- OS Shell: CLI (command language Interpreter) is the interface between the OS and the user. The most commonly used shells are Bash, Tcsh/Csh, Ksh, Zsh, and Fish
- Graphics Server: This provides a graphical sub-system called “X-server” that allows graphical programs to run locally or remotely on the X-windowing system
- Window Manager: Also called GUI (graphical user interface), Example: 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.
- Utilities: Applications or utilities are programs that perform particular functions for the user or another program.
Linux Architecture
The Linux operating system can be broken down into layers:
- Hardware: Peripheral devices such as the system’s RAM, hard drive, CPU, and others.
- Kernel: The core of the Linux OS whose main function is to virtualize and control common computer hardware resources like CPU, allocated memory, accessed data, and others.
The kernel gives each process its virtual resources and prevents/mitigates conflicts between different processes. - Shell: A CLI, aka shell that a user can enter commands into to execute the kernel’s functions.
- System Utility: Makes available to the users all of the operating system’s functionality.
File System Hierarchy
The Linux structure is structured in a tree-like hierarchy and documented in the Filesystem Hierarchy Standard (FHS)
- / : The top-level directory is the root file system and contains all the files required to boot the OS before other filesystems are mounted as well as the files req. to boot the other filesystems.
After boot, all the other filesystems are mounted at the standard mount point as subdirectories of the root. - /bin : Contains essential command libraries
- /boot : Consists of the static bootloader, kernel executable, and files req. to boot the Linux OS
- /dev : Contains devices files to facilitate access to every hardware device attached to the system
- /etc : Local sys. configuration files. Configuration files for installed applications may be saved here as well.
- /home : Each user on the system has a subdirectory here for storage.
- /lib : Shared library files that are req. for system boot.
- /media : External removable media devices such as USB drives are mounted here.
- /mnt : Optional files such as third-party tools can be saved here.
- /opt : Optional files such as third-party tools can be saved here.
- /root : The home directory for the root user.
- /sbin : This directory contains executables used for system administration (binary system files)
- /tmp : The OS and many programs use this directory to store temp. files. This directory is generally cleared upon system boot and may be deleted at other times without any warning.
- /usr : Contains executables, libraries, man files, etc.
- /var : This directory contains variable data files such as log files, email inboxes, web application-related files, cron files, and more.
Hope you guys like it, I was studying the Linux fundamentals module for hackthebox academy and thought I should share my notes with you all.
Socials
https://twitter.com/dipansh72820618?t=UbGQeosfSAJfEHzJBf-guQ&s=09