Linux Notes

File System ๐Ÿ‡บ๐Ÿ‡ธ

In Unix, files and filesystems are important components of the operating system's structure. A file is a collection of data stored on disk, which can include anything from text documents and images to executable programs. Files are organized within directories in a hierarchical structure, allowing f...

System Startup ๐Ÿ‡บ๐Ÿ‡ธ

What happens between the time you push the power button and the time you see the login prompt...

Processes ๐Ÿ‡บ๐Ÿ‡ธ

In any operating system, a process is the fundamental unit of executionโ€”a live instance of a program. Beyond its executable code (the text segment), a process encompasses its dynamic state: the program counter, CPU registers, call stack, heap, and other variable storage. To manage and schedule these...

Sed and Awk ๐Ÿ‡บ๐Ÿ‡ธ

sed (Stream Editor) and awk are powerful command-line utilities that originated from Unix and have become indispensable tools in Unix-like operating systems, including Linux and macOS. They are designed for processing and transforming text, allowing users to perform complex text manipulations with s...

Virtual Machines ๐Ÿ‡บ๐Ÿ‡ธ

Virtual machines have revolutionized the way we approach computing resources by enabling the creation of software-based representations of physical hardware. This concept, known as virtualization, allows us to emulate hardware components like CPUs, memory, storage devices, and network interfaces, pr...

Commands ๐Ÿ‡บ๐Ÿ‡ธ

Let's explore important commands and techniques for efficiently retrieving information and navigating the command line. Understanding how to review past commands, access command documentation, and search for relevant tools are key skills for working effectively in the terminal...

Tar and Gzip ๐Ÿ‡บ๐Ÿ‡ธ

Working with files on Unix-based systems often involves managing multiple files and directories, especially when it comes to storage or transferring data. Tools like tar and gzip are invaluable for packaging and compressing files efficiently. Understanding how to use these commands can simplify task...

Selinux ๐Ÿ‡บ๐Ÿ‡ธ

Security-Enhanced Linux (SELinux) is a robust security module integrated into the Linux kernel that provides a mechanism for supporting access control security policies. Unlike traditional discretionary access control (DAC) systems where users have control over their own files and processes, SELinux...

Disk Io Analysis ๐Ÿ‡บ๐Ÿ‡ธ

Disk I/O operations directly impact performance in applications requiring frequent or large-scale data access. Understanding and monitoring disk I/O is essential for diagnosing performance bottlenecks, optimizing resource utilization, and ensuring that applications run efficiently. Disk I/O analysis...

Files and Dirs ๐Ÿ‡บ๐Ÿ‡ธ

One of the fundamental skills is to navigate and manage files and directories effectively. Here, we focus on the crucial concepts that will facilitate your work within the file system...

Grep ๐Ÿ‡บ๐Ÿ‡ธ

The grep command is one of the most powerful and versatile tools in the Unix and Unix-like operating systems, including Linux and macOS. Its name stands for global regular expression print, and it is primarily used for searching plain-text data sets for lines that match a regular expression or a fix...

Shells and Bash Configuration ๐Ÿ‡บ๐Ÿ‡ธ

A Unix shell is a command-line interpreter that provides a user interface for accessing an operating system's services. It allows users to execute commands, run programs, and manage system resources. The shell acts as an intermediary between the user and the operating system kernel, translating user...

Package Managers ๐Ÿ‡บ๐Ÿ‡ธ

Debian and Ubuntu are popular Linux distributions for home users. These distributions and their derivatives use the Advanced Package Tool (APT). Other distributions use alternative package managers, like DNF, YUM, Pacman, which have unique functionalities and syntax...

Pipe and Redirect ๐Ÿ‡บ๐Ÿ‡ธ

Input redirection (<) allows a command to read from a file, while output redirection (>) sends a command's output to a file. Streams like stdin, stdout, and stderr control the flow of data between commands and the system, where stdin is the input, stdout is the standard output, and stderr is the err...

Managing Users ๐Ÿ‡บ๐Ÿ‡ธ

In Linux, user management is a crucial aspect of system administration. A user is essentially an entity that can log into the computer system and perform tasks based on the permissions granted to them. The Linux operating system stores user-related information in a couple of key files: /etc/passwd a...

Networking ๐Ÿ‡บ๐Ÿ‡ธ

Networking is the practice of connecting computers and devices so that they can communicate and exchange data. It forms the backbone of the internet, local area networks, and even small home networks. To grasp the intricacies of networking, it's imperative to familiarize oneself with key terminologi...

Disk Usage ๐Ÿ‡บ๐Ÿ‡ธ

Managing and monitoring disk usage is necessary for server maintenance, allowing administrators to identify disk space shortages caused by large log files, such as Apache or system logs, and malfunctioning applications that generate excessive data. Tools like df provide quick overviews of available ...

Introduction ๐Ÿ‡บ๐Ÿ‡ธ

Linux is a versatile and powerful open-source operating system that forms the backbone of countless technological infrastructures, from servers and desktops to mobile devices and embedded systems. Known for its stability, security, and flexibility, Linux provides a robust platform that can be custom...

Services ๐Ÿ‡บ๐Ÿ‡ธ

A service in computing is a background process that performs specific tasks or offers various functionalities to other programs. These services typically communicate using methods such as sockets or inter-process communication (IPC). The primary purposes of a service include...

Kernel ๐Ÿ‡บ๐Ÿ‡ธ

We will now delve deeply into the Linux kernel to understand its role in the operating system, where it resides on your system, and how kernel modules function. We will also explore how to download and examine the Linux kernel source code, and discuss the various configuration options available with...

Ports ๐Ÿ‡บ๐Ÿ‡ธ

In computer networking, ports serve as endpoints for communication between devices, similar to doors through which data flows in and out of a computer. In today's interconnected digital landscape, network security is paramount. Network ports are critical points that require diligent management and s...

Dwm ๐Ÿ‡บ๐Ÿ‡ธ

The Dynamic Window Manager (DWM) is a minimal, lightweight, and highly efficient tiling window manager designed to help you manage application windows in a clean and distraction-free manner. Instead of overlapping windows as seen in traditional window managers, DWM organizes windows in a tiled layou...

Task State Analysis ๐Ÿ‡บ๐Ÿ‡ธ

Monitoring the performance of applications often involves keeping an eye on resource usage like CPU load, memory consumption, and disk I/O. However, to truly understand what's happening inside an application, especially one that's multi-threaded, it's helpful to look at the states of its threads ove...

Ssh and Scp ๐Ÿ‡บ๐Ÿ‡ธ

SSH, SFTP, and SCP are network protocols that provide secure data communication and file transfer over insecure networks. Here's a brief overview of each...

Cron Jobs ๐Ÿ‡บ๐Ÿ‡ธ

Cron is a powerful utility in Unix-like operating systems that automates the execution of scripts or commands at specified times, dates, or intervals. It is used for tasks such as system maintenance, backups, updates, and more...

Encryption ๐Ÿ‡บ๐Ÿ‡ธ

Encryption is the cornerstone of modern data security, ensuring that information remains confidential and unaltered during storage and transmission. By converting plaintext into ciphertext using cryptographic algorithms, encryption protects data from unauthorized access and tampering...

Running Executables ๐Ÿ‡บ๐Ÿ‡ธ

We'll explore the inner workings of the Linux kernel, focusing on how it loads and executes binaries. We'll dive into the execve system call, build a custom kernel, and use debugging tools to see the execution process in action. Whether you're a seasoned developer or just curious about operating sys...

Nfs ๐Ÿ‡บ๐Ÿ‡ธ

NFS, or Network File System, is a protocol that allows different computers to share files over a network as if they were on the local machine. This means you can access files on another computer just like you would access files on your own, making collaboration and resource sharing much easier. NFS ...

Permissions ๐Ÿ‡บ๐Ÿ‡ธ

File permissions are crucial in any Unix-like operating systems, including Linux, which employ several mechanisms for controlling access to files and directories. These mechanisms include standard permissions, special permissions, and access control lists (ACLs)...

Performance Monitoring ๐Ÿ‡บ๐Ÿ‡ธ

Performance monitoring helps you identify bottlenecks or issues that may be affecting your system's performance. We'll now explore some tools and techniques available for monitoring performance and explain some usage statistics, such as CPU and RAM usage...

Environment Modules ๐Ÿ‡บ๐Ÿ‡ธ

Environment Modules is a powerful and flexible tool that enables dynamic modification of a user's environment via modulefiles. Each modulefile contains the information necessary to configure the shell for a specific application or version, allowing users to seamlessly switch between different softwa...

Ldap ๐Ÿ‡บ๐Ÿ‡ธ

LDAP is a protocol used to access and manage directory information over an IP network. It is open, vendor-neutral, and an industry standard. LDAP is commonly used for centralized authentication, where user credentials and permissions are managed in a single directory and applied across multiple syst...

Enviroment Variable ๐Ÿ‡บ๐Ÿ‡ธ

In Unix-like operating systems, variables play a crucial role in the functionality of the shell, acting as containers to store data, configuration settings, and system information. There are primarily two types of variables in a shell environment: environment variables and shell variables...

Log Files and Journals ๐Ÿ‡บ๐Ÿ‡ธ

Understanding how logging works in Linux is like learning the language your system uses to communicate. Logs are the detailed records that your system keeps about its activities, and they are invaluable for troubleshooting, monitoring performance, and ensuring security. Let's embark on a journey to ...

Logical Volume Management ๐Ÿ‡บ๐Ÿ‡ธ

Think of data storage devices, such as DVDs, USB flash drives, and hard drives (HDDs or SSDs), as an entire cake. This cake can be cut into smaller slices or 'partitions'. These partitions are essentially divisions or sections within the storage device, helping to categorize or organize the storage ...

Finding Files ๐Ÿ‡บ๐Ÿ‡ธ

The find, locate, and which commands are commonly used for file search operations. The find command performs a comprehensive search using attributes such as name, size, and type. locate provides a faster, albeit periodically updated, search by filename. which locates the path of a program's executab...

Firewall ๐Ÿ‡บ๐Ÿ‡ธ

A firewall is like a guard for your computer. It keeps your computer safe from others who shouldn't use it. It checks the information going in and out and follows safety rules. In Linux, there are several utilities to manage your firewall, including iptables, ufw, and firewalld...

Hardware ๐Ÿ‡บ๐Ÿ‡ธ

Linux is a known for its ability to run on a broad range of hardware, from desktops and servers to embedded systems and IoT devices. Its modular kernel design allows efficient hardware management, enabling Linux to support various processors, GPUs, storage devices, and peripherals. With a vast colle...

Utilities ๐Ÿ‡บ๐Ÿ‡ธ

We will discuss various tools that can be used on Linux systems for tasks such as taking screenshots, recording screens, preparing bootable sticks, and detecting malware. It provides brief explanations of each tool and includes installation and usage instructions...

Partitions ๐Ÿ‡บ๐Ÿ‡ธ

Partitioning a disk involves dividing a physical storage device into separate, manageable sections called partitions. Each partition functions as an independent disk within the operating system, allowing for better organization, multi-boot setups, or separation of system files from user data. The tw...

Inodes and Symlinks ๐Ÿ‡บ๐Ÿ‡ธ

Inodes are critical as they store essential metadata about files, such as permissions and locations, allowing efficient file system management. Hard links are important because they let multiple file names point to the same inode, saving disk space by avoiding data duplication. Symlinks provide flex...

Mounting ๐Ÿ‡บ๐Ÿ‡ธ

If you come from a Windows world, the idea of mounting might sound strange at first, since Linux handles storage devices and filesystems quite differently. In Linux, "mounting" is the process of making a storage device (such as a hard disk partition, USB drive, or network share) accessible within th...