You are on page 1of 6

An operating system(OS) - system software that acts as an intermediary between computer

hardware and application software. It serves as the foundational software platform that manages and
controls the hardware resources of a computer and provides various services to enable the execution
of software applications. Operating System is the most fundamental software that runs
on a computer and is responsible for coordinating and managing the activities of both the hardware
and the software.

Kernel - core component of the operating system responsible for interacting directly with hardware
and managing low-level resources. It is loaded into memory during the boot process
An OS kernell serves as the bridge between the hardware of a computer system and the user-level
software applications, including the following:
* Process Management - The kernel creates, schedules, and manages processes. It controls process
execution, switching between processes to allocate CPU time, and provides
mechanisms for process communication and synchronization.
* Memory Management - Linux OS memory management subsystem handles memory allocation
and deallocation, virtual memory management, and address space isolation between processes.
It ensures efficient and secure use of system memory.
* Device Management - The kernel communicates with hardware devices through device drivers. It
provides a unified interface for interacting with hardware, allowing applications
to access devices like storage drives, network cards, and input/output devices.
* File System Management - Linux supports various file systems, and the kernel manages file
operations, including reading, writing, creating, and deleting files. It also maintains
file metadata and controls access permissions.
* System Calls - System calls are a set of functions that enable user-level applications to request
services from the kernel. Examples include opening files, creating processes,
and performing I/O operations.
* Interrupt Handling: The kernel manages hardware interrupts generated by devices like timers,
network cards, and disk controllers. It dispatches these interrupts to the appropriate
interrupt service routines (ISRs) for handling.
* Schedulers - Linux employs process scheduling policies to determine how CPU time is allocated
to running processes. The scheduler aims to maximize system throughput and ensure
fair CPU utilization and distribute workload evenly.
* Networking - Linux includes a comprehensive networking stack that supports a wide range of
network protocols, socket communication, and network device management.
* Inter-Process Communication(IPC) - Linux offers various IPC mechanisms, such as pipes,
sockets, message queues, and shared memory, to enable processes to communicate and synchronize.
*Security - The kernel enforces security policies, including user and group permissions, access
control lists (ACLs), and capabilities. It provides process isolation and
manages system privileges.
*Virtual File System(VFS): VFS is an abstraction layer that provides a unified interface for
interacting with different file systems. It allows multiple file systems to coexist
and be accessed seamlessly.

Linux Kernel supports loadable kernel modules, which are pieces of code that can be dynamically
loaded into the running kernel. This modular design allows for extensibility
and the addition of device drivers and features without rebooting the system.

Linux is an open-source operating system kernel that serves as the core component of many
different operating systems(created by Linus Torvalds in 1991). Nowadays, one of the most
popular and widely used operating systems in the world; Linux is known for its stability, security,
and versatility, and it is commonly used for servers, desktop computers,
embedded systems, and more...
Complete Linux operating system -Linux kernel combined with various software components and
tools, including libraries, system utilities, desktop environments, and application software.

Kernels are not interchangeable; the Linux kernel is different from the MacOS X kernel or the
Windows kernel. Each of these kernels uses a different internal design and provides
different software interfaces for programs to use. So, each OS is built from the kernel up and uses
its own set of programs that further define each Operating Syetems features.

The kernel is at the core of any OS, but it’s a component that most users don’t directly manipulate.
Instead, most users interact with a number of other software components,
many of which are closely associated with particular OSs. Some of these more user visible
programs/software components are:
* Command-line Shells - text-based interface for interacting with an operating system or a computer
system through a command-line interface(CLI). It allows users to enter
text commands, typically in the form of text strings, and receive text-based responses from the
system. Command-line shells are powerful tools for administration and development,
as they provide precise control over the system and can be used for various tasks, such as file
management, process control, system configuration, and automation.(ex Linux terminal)
* Graphical User Interfaces(GUI) - Type of user interface that allows users to interact with software
or computer systems through graphical elements like: icons, windows,buttons, menus.
GUIs provide a visually intuitive way for users to interact with computers and software
applications, making them accessible to a wide range of users without Specialized knowledge.

Libraries - In operating systems, libraries consist of precompiled code modules that provide
functions and routines to assist software applications in interacting with the
operating system, hardware, and various services. These libraries play a crucial role in simplifying
application development and enhancing code reuse.

*Source code - human-readable, high-level instructions and statements written by software


developers to create computer programs. It consists of plain text files containing the
instructions, logic, and algorithms that a computer's central processing unit(CPU) can understand
and execute when compiled or interpreted.
Software development involves writing, testing, and refining source code to create functional and
efficient programs. Developers use integrated development environments (IDEs),
text editors, and other development tools to write, edit, and manage source code. Once the code is
ready, it can be compiled or interpreted to produce executable software that
can be run on other computers.
*Open source - practice of source code or original work being made freely available to the public,
allowing anyone to view, use, modify, and distribute it.
This approach is based on principles of transparency, collaboration, and community-driven
development. One of the fundamental principles of all Linux distributions.

Linux distributions(Linux distros) - variations of the Linux OS that consist of the Linux kernel and
a collection of software applications and libraries. These distributions are
created and maintained by distinctively seperate organizations, communities, individuals. They
package Linux with different sets of software, configurations, and user interfaces
to meet specific needs and preferences.
Some of the well-known Linux distributions: Ubuntu, Debian, Fedora, CentOS, Arch Linux,
openSUSE, Linux Mint and many more...
Distributions maintain their own software repositories, where users can find and download software
packages. These repositories include not only the OS components but also a wide
range of applications and utilities. Linux distributions often come with their own package
management systems. These systems allow users to install, update, and remove software
packages easily. Common package management tool: APT(Debian/Ubuntu),
YUM/DNF(Fedora/RHEL),Pacman(Arch Linux)

Command lines are powerful tools in Linux; they’re the basis on which many of the friendlier GUI
tools are built. They can be accessed without the help of a GUI, they can be scripted
terminal - text-based interface that allows you to interact with your computer using text commands,
aka "command line interface" (CLI) or "shell." The terminal provides a way
for users to input commands and receive text-based responses from the operating system.
Terminals can be used to connect to remote servers and systems through protocols like SSH (Secure
Shell), allowing you to manage remote machines from your local terminal.

Bash("Bourne-Again Shell") - widely used Unix shell(command-line interpreter), in the Unix and
Linux operating systems. It is the default shell for many Linux distributions and macOS.
Bash provides a command-line interface (CLI) for users to interact with the operating system by
entering text commands. widely used in scripting and automation tasks.

Directories we encounter in file systems and terminals are represented by folders in graphical file
explorers, in path string, / symbol is seperator between directories.
Home Directory(home folder or just home) - directory in a file system that is associated with a
particular user in Linux. It serves as the primary location for a user to store their
personal files, configuration settings, and user-specific data. Each user on the system has their own
unique home directory, and it is typically represented by the tilde (~) symbol
in the command-line interface

Current working directory(cwd) - directory in a file system that is currently active for a given
process or user in a command-line environment. When you run commands or perform
file operations in a command-line interface, the current working directory serves as the reference
point for those actions.
pwd( print working directory) - command to display the current working directory. The current
working directory is the directory in the file system where you are currently
located or working within in your terminal session.

Path - string that specifies the location or address of a file or directory within the file system's
hierarchy. It provides a way to identify the precise location of a file or directory,
allowing users and software to access and manipulate them.
* Absolute paths - exact and fixed location in the file system, always starting from the root
directory( \ ). They are commonly used when you need to specify a precise location,
regardless of where your current working directory is.
* Relative paths describe a location based on your current working directory, making them more
flexible for navigation within a specific context. Useful when you want to reference
files or directories relative to your current position in the file system.

key directories in linux:


/ - The top-level directory is the root filesystem and contains all 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
standart mount points as subdirectories of the root.
/bin - Contains essential command binaries.
/boot - Consists of static bootloader, kernel executable, and files required to boot the linux OS.
/dev - Contains device files to facilitate access to every hardware device attached to the system.
/etc - Local system configuration files. Configuration files for installed applications may be saved
here as well.
/home - Each user of the system has subdirectory here for storage.
/lib - Shared library files that are required for system boot.
/media - External removable media devices such as USB drives are mounted here.
/mnt - Temporary mount point for regular filesystems
/opt - Optional files such as third-party tools can be saved here
/root - The home directory of 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 temporary files. This directory is
generally cleared upon system boot
/usr - Contains executables, libraries, man files, etc...
/var - this directory contains variable data files such as log files, email in-boxes, web application
related files, cron files, and more

In linux everything is represented as a file, this simplifies the interaction between processes and
resources in Unix-like systems. It means that many resources can be accessed
*ls command - used to list the files and directories in the current directory (folder) or in a specified
directory. By default, when you run the ls command without any arguments,
it lists the files and directories in the current directory. ls general template - ls [options] [directory]

*pwd command - Print Working Directory.Runing the pwd command in a terminal, it prints the full
path of the current working directory, one you are currently in within the file system
*cd command - used to change the current working directory in a terminal or shell session. Way to
navigate through the file system by moving from one directory to another.
template cd /path/to/somewere.Common usage: cd ~ - change directory to current users home
direcroty; cd / - change directory to root; cd .. - change directory to one level up

and manipulated using standard file operations, such as reading, writing, and seeking. This
uniformity allows for a consistent and efficient way to work with a wide range of
resources, whether they are hardware devices, network connections, or system information.

'man' command - used to display the manual pages for various commands, functions, system calls,
configuration files, and other topics. These pages provide detailed documentation
and usage information for these topics. template: man [command_name]
'info' command - used to access and read documentation in the Info format, is a hypertext
documentation system that provides structured, detailed information about various topics,
including commands, programs, and system concepts. Info pages are similar to man pages but often
offer more extensive and organized documentation. template: info [command_name]

*'mkdir' command - create directory with specified name. template: mkdir [options] directory_name
*'touch' command - create file with specified name. template: touch [options] file_name
*'echo' command - display line of text, see it as print. template echo 'this is some text'. you can write
directly into file: echo 'this goes into file' > text_file.txt

'cat' command - used to concatenate and display the contents of one or more files in the terminal.
template cat [options] [file1] [file2] .... [filen]
'less' - Linux terminal pager program that allows you to view the contents of text files one screen at
a time. Provides navigation and search features.
*Nano - text editor in Linux. It is a user-friendly, command-line-based text editor designed for
simplicity and ease of use, especially for users who may not be familiar with more
complex text editors like vi or emacs. Nano provides a simple and intuitive interface for editing text
files directly in the terminal.
*vi(Vim or Vi IMproved) - powerful text editor in Linux. It is known for its extensive feature set,
flexibility, and efficiency. vi operates in different modes:
Normal Mode,Insert Mode,Command-Line Mode. Has a learning curve but highly effective.

*'cp' command - copy files and directories, via creating a duplicate of a file or directory in another
location. template: cp [options] source destination.
*'mv' command - move files and directories from one location to another. It can also be used to
rename files and directories. example: mv file.txt /path/to/destination/
renaming file via move example: mv oldfile.txt newfile.txt
*'rm' command - remove each given file, by default, it doesn't remove directories. rm -r
directory_name to remove directory recursively with all its contents.

'zip' command - used to create and manage ZIP archive files. ZIP is a widely used compression and
archive format that allows you to package one or more files or directories
into a single compressed archive. template: zip [options] your_given_name.zip files_or_directories.
you can give compression level (-0 to -9) as an option
'unzip' command - used to extract the contents of ZIP archive files. template: unzip [options]
archive.zip

tar command - used for creating, viewing, extracting, and managing tarball files. A "tarball" is a
compressed archive file that can contain one or more files and directories.
creating tarball: tar [options] -cvzf archive.tar files_or_directories. -c: Create a new archive; -v:
Verbose mode; -z: add compression; -f archive.tar: created file name.
extract tarball: tar [options] -xvzf archive.tar: -x: extract option; -v: Verbose mode;-z: add
compression; -f archive.tar: created file name.

sudo(superuser do) - execute commands with elevated privileges. Allows authorized users to run
commands as the superuser(like root) or as another user, as specified in the system's
sudoers file. Key security feature in Linux that helps prevent unauthorized users from making
system-wide changes or potentially harmful actions.
works just like run as administrator in windows systems

Package managers - tools and systems used in Linux distributions to manage the installation,
updating, and removal of software packages. They ensure that software installations are
consistent and that dependencies are satisfied. Different Linux distros use Different package
managers. Common packet managers:
-Advanced Package Tool (APT): Distributions: Debian, Ubuntu, and their derivatives.
-Yum/DNF (Dandified Yum): Distributions: Red Hat Enterprise Linux (RHEL), CentOS, Fedora.
-Pacman: Distribution: Arch Linux and its derivatives.
-Snapd: Description: Snapd universal package manager for Ubuntu and other Linux distributions. It
allows for the distribution of applications as
"snaps" with bundled dependencies.
-Flatpak: Description: Flatpak another universal package manager designed to work across different
Linux distributions. It provides sandboxed applications with their dependencies.

APT
*find packages - apt search package_name
*install packages - sudo apt install package_name
*remove packages - sudo apt remove package_name
Snap
*find packages - snap find package_name
*install packages - sudo snap install package_name
*remove packages - sudo snap remove package_name

You might also like