Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

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.

Universal package formats(or cross-distribution package formats) - are containerized or


standardized
packaging formats designed to simplify software distribution across different Linux
distributions.They
try to address the challenges posed by the diversity of package managers and package formats used
by
various Linux distributions. They allow developers to package their applications once and have
them
run on multiple Linux distributions without modification.They are: Snapd, Flatpak, Applmage
universal package formats provide: Compatibility, isolation,Ease of Distribution, Automatic
Updates

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

Snap packages use containerization technology to set up and run applications on Linux systems.
Snap packages are self-contained and include not only the application itself but also all its
dependencies
and libraries required for it to run.
Snap packages use containerization to provide a self-contained and secure environment for
applications,
making them more portable and less likely to encounter compatibility issues across different Linux
distributions.

A process is an independent program in execution. It consists of the program code, data, and a set of
resources:
memory, CPU registers, file handles, network sockets allocated by the operating system to execute
that program.
*Each process is identified by a unique numerical identifier called a Process ID (PID).
This PID is used by the operating system to manage and control processes.
*Processes are isolated: Each process is isolated from other processes, meaning that the memory
and resources
of one process are generally inaccessible to other processes.
*Processes can be created and terminated by the operating system or by other processes. The
process creation
involves allocating necessary resources and copying the program code and data into memory.
Termination involves releasing these resources
*OS provides mechanisms to control processes, including scheduling them to run on the CPU,
pausing or resuming
their execution, and setting their priority levels.
*A process can be in different states during its lifecycle: running, ready, blocked, and
terminated.These states
describe what the process is currently doing and whether it's waiting for a resource or actively
executing.
*Modern computer systems are capable of running multiple processes concurrently. This means that
multiple processes
can be in various stages of execution at the same time, thanks to features like multitasking.
*For sharing data, coordinating activities or more, processes use Inter-process communication (IPC)
mechanisms like pipes, sockets, and message queues.
*In most OS, a process can create child processes. The parent process may spawn one or more child
processes,
and these child processes can, in turn, create their own child processes. This forms a process
hierarchy.

Windows and linux systems handle processes slightly differently.


in Windows Processes are monitored using tools like Task Manager and Performance Monitor.
in Linux Processes are monitored using tools like top, ps, and htop via the command line.
top and htop are valuable tools for monitoring system performance and managing processes, but
htop is often
favored for its improved usability and visual representation of data. htop usually doesn't come
preinstalled

In Linux, generally processes are managed through the Linux kernel using fork, exec, and kill
system calls
In windows, generally processes are managed via Task Manager and CreateProcess function.

Daemon - background process or service that runs independently of user interaction in Linux.
Daemons are
typically started at system boot time and continue to run throughout the system's uptime,
performing
various tasks or providing services. They do not require user intervention and often operate
silently in the background. Daemons are not tied to a specific user session.
Daemons are crucial for the functionality of a Linux system, as they provide essential services and
background tasks required for the system to operate efficiently.
Daemon names often end with a lowercase 'd', ex. httpd for the Apache HTTP daemon

systemctl is a command-line utility in Linux used to control and manage systemd services and units.
systemd is the init system and service manager used by many modern Linux distributions to handle
the
initialization process, service management, and system state.

services - In Windows systems, sercives arebackground processes or programs that run


independently of
the user interface and provide various functionalities to the operating system and applications.
These
services are an integral part of the Windows architecture and are essential for the proper
functioning of the OS itself.

Service Control Manager is a core component of Windows responsible for managing services. It
starts,
stops, and configures services based on configuration settings stored in the Windows Registry

Cache - hardware or software component that stores data temporarily to serve future requests for
that data
more quickly. Caching is a technique used in computing and information technology to improve
data access and
system performance. Caching is used to reduce the time and resources required to fetch or compute
data
by keeping frequently used data closer to the point of use.
Caches are used to store data that is frequently accessed. By keeping this data readily available,
caching can significantly reduce the time it takes to retrieve the data, as it can be accessed much
faster than fetching it from the original source, such as a slower storage device or a remote server.

*Memory Cache: Hardware-level memory caches, such as CPU caches (L1, L2, L3 caches), store
frequently used
data or instructions in a processor's memory, reducing the time required to access this data.
linux terminal: command 'lscpu' to view hardware-level caches
*Disk Cache: Disk caches are used to store recently accessed data from a hard disk or solid-state
drive(SSD)
in system memory (RAM), improving overall storage performance.

*RAM(Random Access Memory) -type of volatile memory that stores data and instructions that a
computer's CPU
can access quickly and directly. RAM is a key component for the performance and functionality of
a computer system.
*RAM temporarily stores data and loses that data when the computer is powered off or restarted.
Unlike hard drives or
solid-state drives (SSDs), which can retain data even when the power is turned off.
*RAM serves as temporary storage for data that the CPU is actively using or processing. When
application/file is active,
a portion of it is loaded into RAM so that the CPU can work on it without the delays associated with
accessing
data from slower storage devices.
*RAM is much faster than other forms of storage, such as hard drives or SSDs. It provides rapid
access to data,
allowing the CPU to retrieve and manipulate information quickly, which is essential for smooth and
efficient
operation of applications and the operating system
*When RAM becomes full, the operating system can use a portion of the hard drive or SSD as
virtual memory to
store data temporarily, although this is much slower than accessing data from RAM.

Swap - space on a storage device (hard drive or SSD) that is used as an extension of a computer's
physical memory (RAM).
It serves as virtual memory, allowing the operating system to temporarily move data and programs
from RAM to the swap
space when the physical RAM is fully utilized. This process is called swapping (windows
equivalent: paging)
*In Linux/Unix-like systems, is called a "swap partition" or "swap file."
*In Windows OS, the swap space is called a "page file."
*Swap space extends the available memory capacity of a computer. When RAM becomes fully
occupied with running
applications and data, the operating system can use swap space to offload some data that is not
currently in
active use. This prevents the system from running out of memory, which could lead to performance
loss/crash.
*Moving data between RAM and swap space is known as paging or swapping. When an application
requires more memory
than is available in RAM, the operating system identifies portions of RAM that are not being
actively used and
swaps them out to the swap space. When that data is needed again, it can be swapped back into
RAM.
*Swap space is much slower than physical RAM because it resides on a storage device, hard drive
or SSD,
which has slower access times compared to the high-speed access of RAM. Accessing data from
swap space can
result in performance bottlenecks, so it's used as a last resort when RAM is exhausted.

loopback - can refer to mounting a file as if it were a block device, creating a virtual file system
within a file
In networking, a loopback interface (localhost or IP 127.0.0.1) allows a computer to communicate
with itself

*Partition is a logical section of a storage device that appears as a separate disk drive to the
operating system.
Each partition can have its own file system, allowing users to organize data, install operating
systems, and
separate user data from system files
*A partition table is a data structure located at the beginning of a storage device that contains
information about
the layout of partitions on that device. It stores metadata about each partition, such as its size,
location, type,
and file system format

GPT(GUID Partition Table) - modern & flexible partition table format. It is part of the Unified
Extensible Firmware
Interface (UEFI) standard and is designed to overcome the limitations of MBR. GPT supports larger
storage capacities,
allows for more partitions (up to 128 primary partitions), and offers built-in data redundancy and
integrity checks.

MBR (Master Boot Record) - legacy partition table format. It is widely used in older systems and
has limitations,
like support for a maximum of four primary partitions and a total storage capacity of up to 2
terabytes.
fdisk is a command-line utility used for partitioning hard drives or storage devices on Linux
systems.
It allows you to create, modify, delete, and manage partitions on a disk

A file system is a method or structure used by an operating system or software for organizing,
storing, and accessing
files and data on a storage device, such as a hard drive, solid-state drive (SSD), or external storage
media. File systems
provide a hierarchical structure that organizes data into directories (folders) and files, making it
easier for
users and programs to manage and locate data. Common file systems:
*EXT (Extended File System) - EXT file systems, including EXT2, EXT3, EXT4, is used in
various Linux distributions.
These file systems offer features such as journaling, POSIX compliance, and support for extended
attributes.
EXT4 is the most used and provides improved performance and reliability compared to earlier
versions.
*NTFS (New Technology File System) - default file system used by modern versions of the
Microsoft Windows OS, including
Windows7, 8, 10 and others. Offers features like file-level security, file compression,
encryption,support for
large volumes and file sizes. Known for its reliability and robustness.
*FAT (File Allocation Table) - FAT file systems, including FAT12, FAT16, and FAT32, were widely
used in older versions of
Windows, DOS, and early versions of other operating systems.have limited features compared to
modern file systems,like no
built-in file-level security or journaling.FAT file systems are still used for some USB flash drives
and memory cards
because of their simplicity and compatibility.
*exFAT (Extended File Allocation Table) - file system introduced by Microsoft as a successor to
FAT. Designed for use with
flash drives, memory cards, and other removable media, supporting larger file sizes and storage
capacities than FAT.
exFAT is a good choice for cross-platform compatibility between Windows, macOS, and some
Linux systems.
*APFS (Apple File System) - used by Apple's macOS, iOS, watchOS, and tvOS.It provides
features like snapshotting,
copy-on-write, and space sharing, making it more efficient and responsive.APFS is optimized for
SSDs and flash storage.
*ZFS (Z File System) - advanced file system and volume manager used primarily in Unix-based
operating systems like FreeBSD
and some Linux distributions. Offers features such as data integrity, automatic data compression,
and flexible storage management.
ZFS is known for its scalability and data protection capabilities.
there are many other more niche file systems.

lsblk command - used to list information about block devices, which typically includes hard drives,
solid-state drives (SSDs),
and other storage devices. It provides a hierarchical view of the block devices and their
relationships,
including partitions and logical volumes
mount/umount - used for mounting and unmounting file systems. Mounting is the process of
attaching a file system to a specific
directory in the Linux file system hierarchy, making its contents accessible; unmounting is the
process of detaching a mounted
file system from the directory, thus making it inaccessible.

/etc/fstab file, "file system table," is a configuration file in Linux and Unix-like operating systems
that specifies how disk
partitions and storage devices should be automatically mounted during the system boot process. It
contains entries that define
the file systems, their mount points, mount options, and other parameters. fstab file fields:
<device> <mount_point> <file_system_type> <options> <dump> <pass>

add-apt-repository universe (add repository to donload packages exfat-fuse exfat-utils )

You might also like