chore: sync content to repo (#9128)

Co-authored-by: kamranahmedse <4921183+kamranahmedse@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-09-08 18:37:59 +01:00
committed by GitHub
co-authored by kamranahmedse
parent 6c66e7fe9b
commit 7fccbe5066
84 changed files with 190 additions and 169 deletions
@@ -1,8 +1,26 @@
# Archiving and Compressing
# Archiving
Linux archiving combines multiple files into single archives using `tar`, while compression reduces file sizes with `gzip` and `bzip2`. Use `tar cvf` to create archives, `tar xvf` to extract, and `tar cvzf` for gzip-compressed archives. These separate processes are often combined for efficient backup and distribution, with `tar.gz` and `tar.bz2` being common formats.
Linux offers powerful utilities for archiving, where multiple files and directories are combined into a single file, primarily for backup and simplification of distribution. The main tools used for this purpose are `tar`, `gzip`, and `bzip2`.
The `tar` command, originally for tape archiving, is a versatile tool that can manage and organize files into one archive. Meanwhile, `gzip` and `bzip2` are used for file compression, reducing the file size and making data transmission easier.
Take a look at the following commands in use:
# To create a tar archive:
tar cvf archive_name.tar directory_to_archive/
# To extract a tar archive:
tar xvf archive_name.tar
# To create a gzip compressed tar archive:
tar cvzf archive_name.tar.gz directory_to_archive/
#To create a bzip2 compressed tar archive:
tar cvjf archive_name.tar.bz2 directory_to_archive/
Remember, in Linux, archiving and compression are separate processes, hence `tar` to archive and `gzip`/`bzip2` to compress. Although they're commonly used together, they can very much be used separately as per the requirements.
Visit the following resources to learn more:
- [@article@Linux File Packaging and Compression](https://labex.io/tutorials/linux-file-packaging-and-compression-385413)
- [@article@Compression and Archiving with `tar`, `gzip`, and `bzip2`](https://www.linuxbash.sh/post/compression-and-archiving-with-tar-gzip-and-bzip2)
- [@article@Linux File Packaging and Compression](https://labex.io/tutorials/linux-file-packaging-and-compression-385413)
@@ -4,9 +4,7 @@ Authentication logs in Linux record all auth-related events like logins, passwor
Here is an example of how you can use the `tail` command to view the last few entries of the authentication log:
```bash
tail /var/log/auth.log
```
tail /var/log/auth.log
Visit the following resources to learn more:
@@ -8,6 +8,6 @@ Visit the following resources to learn more:
- [@article@IBM.com: Awk by Example](https://developer.ibm.com/tutorials/l-awk1/)
- [@article@AWK Tutorial](https://linuxhandbook.com/awk-command-tutorial/)
- [@video@Learning Awk Is Essential For Linux Users](https://www.youtube.com/watch?v=9YOZmI-zWok)
- [@article@Linux awk Command: Text Processing](https://labex.io/tutorials/linux-linux-awk-command-text-processing-388493)
- [@video@Learning Awk Is Essential For Linux Users](https://www.youtube.com/watch?v=9YOZmI-zWok)
- [@feed@Explore top posts about Bash](https://app.daily.dev/tags/bash?ref=roadmapsh)
@@ -1,6 +1,6 @@
# Background and Foreground Processes
Linux processes run in foreground (fg) taking direct user input or background (bg) running independently. Start background processes with `command &` or use `Ctrl+Z` then `bg` to pause and resume in background. Use `fg` to bring background processes to foreground. These job control commands enable managing multiple tasks from a single terminal efficiently.
Linux processes run in foreground (taking direct user input) or background (running independently). Send processes to background with `&` or `bg` command. Bring to foreground with `fg`. Use Ctrl+Z to pause, then `bg` to resume in background. Part of job control for managing multiple tasks simultaneously from single terminal.
Visit the following resources to learn more:
@@ -2,8 +2,8 @@
Linux Navigation Basics is about using simple commands to move around and manage files on your computer. For example, `cd` lets you go into different folders, `ls` shows you what files and folders are inside, and `pwd` tells you where you are currently. These commands help you easily find and organize your files.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Linux Filesystem Navigation Basics](https://linuxconfig.org/filesystem-basics)
- [@article@Linux Navigation and File Management](https://www.digitalocean.com/community/tutorials/basic-linux-navigation-and-file-management)
- [@article@Basic Navigation Commands: `cd`, `ls`, and `pwd` ](https://www.linuxbash.sh/post/basic-navigation-commands-cd-ls-and-pwd)
- [@article@Basic Navigation Commands: cd, ls, and pwd ](https://www.linuxbash.sh/post/basic-navigation-commands-cd-ls-and-pwd)
@@ -1,9 +1,9 @@
# Starting and Stopping Services
# Checking Service Logs
Linux service management involves controlling system services like databases, web servers, and network services. Use `systemctl start service_name` to start services, `systemctl stop service_name` to stop them, and `systemctl restart service_name` to restart. These commands require root permissions via sudo and are essential for system administration and configuration management.
System logs are essential for troubleshooting and monitoring Linux systems. Most logs are stored in `/var/log` directory and managed by systemd. Use `journalctl` to view system logs and `journalctl -u service_name` for specific service logs. The `dmesg` command displays kernel messages. Regular log monitoring is crucial for system administration.
Visit the following resources to learn more:
- [@article@Using systemctl Command [15 Examples] - Linux Handbook](https://linuxhandbook.com/systemctl-commands/)
- [@article@Start, Stop & Restart Services in Ubuntu and Other Linux](https://itsfoss.com/start-stop-restart-services-linux/)
- [@article@Start, Restart, and Stop Service Linux: 3 Effective Ways](https://linuxier.com/start-stop-and-restart-services-in-linux/)
- [@article@How to Use journalctl Command to Analyze Logs in Linux](https://linuxhandbook.com/journalctl-command/)
- [@article@journalctl — Linux manual page](https://www.man7.org/linux/man-pages/man1/journalctl.1.html)
- [@article@Linux Log Files Location & How To View Logs Files](https://www.cyberciti.biz/faq/linux-log-files-location-and-how-do-i-view-logs-files/)
@@ -1,9 +1,8 @@
# Checking Service Status
# Creating Services
Checking service status in Linux helps monitor system health and troubleshoot issues. Use `systemctl status service_name` to view detailed service information including active state, process ID, and recent log entries. Commands like `systemctl is-active` and `systemctl is-enabled` provide quick status checks. Service status monitoring is crucial for maintaining system reliability and performance.
Creating Linux services involves setting up background applications using systemd service files. Services run continuously performing essential tasks like web servers, databases, and mail servers. Create `.service` files in `/etc/systemd/system/` with Unit, Service, and Install sections. Control services using `systemctl` commands. Best practice: avoid running services as root for security.
Visit the following resources to learn more:
- [@article@Use systemctl Status Command to Check Service Status](https://linuxhandbook.com/systemctl-check-service-status/)
- [@article@systemctl - [15 Examples] - Linux Handbook](https://linuxhandbook.com/systemctl-commands/)
- [@article@Start, Restart, and Stop Service Linux: 3 Effective Ways](https://linuxier.com/start-stop-and-restart-services-in-linux/)
- [@article@How to Create a systemd Service in Linux](https://linuxhandbook.com/create-systemd-services/)
- [@article@A Beginner's Guide to Creating Linux Services](https://www.fosslinux.com/111815/a-guide-to-creating-linux-services-with-systemd.htm)
@@ -4,7 +4,7 @@ Linux command help provides documentation and usage information for shell comman
Visit the following resources to learn more:
- [@opensource@tldr-pages/tldr](https://github.com/tldr-pages/tldr)
- [@article@Using the Help Command in Linux](https://linuxhandbook.com/help-command/)
- [@article@Chapter 10: Getting Help in Linux Terminal](https://itsfoss.com/linux-command-help/)
- [@opensource@tldr-pages/tldr](https://github.com/tldr-pages/tldr)
- [@article@Get Help on Linux Commands](https://labex.io/tutorials/linux-get-help-on-linux-commands-18000)
- [@article@Get Help on Linux Commands](https://labex.io/tutorials/linux-get-help-on-linux-commands-18000)
@@ -7,4 +7,4 @@ Usually, when you type a command in the terminal, the shell needs to know the ab
Visit the following resources to learn more:
- [@article@Linux path environment variable](https://linuxconfig.org/linux-path-environment-variable)
- [@article@How to find a path of a Linux command like a pro](https://www.cyberciti.biz/howto/finding-a-path-of-a-linux-command-like-a-pro/)
- [@article@How to find a path of a Linux command like a pro](https://www.cyberciti.biz/howto/finding-a-path-of-a-linux-command-like-a-pro/)
@@ -5,4 +5,4 @@ Shell conditionals allow scripts to make decisions based on conditions using `if
Visit the following resources to learn more:
- [@article@Bash Scripting: Conditionals](https://linuxconfig.org/bash-scripting-conditionals)
- [@article@Using If Else in Bash Scripts [Examples] - Linux Handbook](https://linuxhandbook.com/if-else-bash/)
- [@article@Using If Else in Bash Scripts [Examples] - Linux Handbook](https://linuxhandbook.com/if-else-bash/)
@@ -7,4 +7,4 @@ Visit the following resources to learn more:
- [@official@Docker](https://docker.com)
- [@official@Kubernetes](https://kubernetes.io)
- [@article@What is Containerization? - Containerization Explained - AWS](https://aws.amazon.com/what-is/containerization/)
- [@article@What is Containerization? - DigitalOcean](https://www.digitalocean.com/resources/articles/what-is-containerization)
- [@article@What is Containerization? - DigitalOcean](https://www.digitalocean.com/resources/articles/what-is-containerization)
@@ -1,6 +1,6 @@
# Creating, Updating, and Deleting Users
# Create, Update, and Delete Users
Linux user management involves creating, updating, and deleting user accounts for system security and resource management. Use `useradd` or `adduser` to create users, `usermod` to update user details like home directory or shell, and `userdel` to delete users. Effective user management maintains system security and organization in multi-user environments.
Linux user management involves creating, updating, and deleting user accounts for system security and resource utilization. Key commands: `useradd`/`adduser` (create users), `usermod` (update user details like home directory/shell), `userdel` (delete users). Essential for maintaining secure, organized multi-user system environments and efficient resource allocation.
Visit the following resources to learn more:
@@ -1,6 +1,6 @@
# Creating and Deleting Files
# Creating Files
Linux file operations include creating files with `touch` (empty files) or `cat > filename` (with content) and deleting with `rm filename`. Use `rm -i` for confirmation prompts and `rmdir` for empty directories. File deletion is permanent - no recycle bin. Essential commands for basic file management and system administration.
Linux file creation uses `touch` for empty files, `echo "text" > filename` for text files, or `cat > filename` for interactive input. Commands like `mkdir` create directories. File creation is immediate and permanent. Essential for organizing data, scripts, and configuration files in Linux systems.
Visit the following resources to learn more:
@@ -1,8 +1,9 @@
# Creating New Services
# Service Status
Creating custom services in Linux involves writing systemd service unit files that define how processes should start, stop, and restart. Service files are placed in `/etc/systemd/system/` and contain sections like [Unit], [Service], and [Install]. Use `systemctl enable` to enable services at boot and `systemctl start` to run them. Custom services allow automation of background processes.
Service status shows the current state of Linux services including network processes, backend servers, and background applications. Use `systemctl status service_name` to check service states through systemd manager. Example: `systemctl status apache2.service` shows Apache web server status. Essential for diagnosing problems, maintaining performance, and preventing service downtimes.
Visit the following resources to learn more:
- [@article@How to Create a systemd Service in Linux](https://linuxhandbook.com/create-systemd-services/)
- [@article@A Beginner's Guide to Creating Linux Services](https://www.fosslinux.com/111815/a-guide-to-creating-linux-services-with-systemd.htm)
- [@article@Service Management in Linux: A Comprehensive Guide](https://medium.com/@thesureshvadde/service-management-in-linux-a-comprehensive-guide-cb4c7e81dfa9)
- [@article@Use Systemctl Status Command to Check Service Status](https://linuxhandbook.com/systemctl-check-service-status/)
- [@article@How to Check All Running Services in Linux](https://www.2daygeek.com/how-to-check-all-running-services-in-linux/)
@@ -2,8 +2,8 @@
Shell script debugging in Linux uses tools like bash's `-x` option for execution traces, `trap`, `set` commands, and external tools like `shellcheck`. Use `#!/bin/bash -x` in scripts or `bash -x script.sh` from command line for tracing. These debugging options help detect, trace, and fix errors to make scripts more efficient and error-proof.
Visit the following sources to learn more:
Visit the following resources to learn more:
- [@article@How To Debug a Bash Shell Script Under Linux or UNIX](https://www.cyberciti.biz/tips/debugging-shell-script.html)
- [@article@How to Debug a Bash Shell Script in Linux](https://www.linuxtechi.com/debugging-shell-scripts-in-linux/)
- [@article@How to Debug Bash Scripts](https://thelinuxcode.com/debug-bash-script/)
- [@article@How to Debug Bash Scripts](https://thelinuxcode.com/debug-bash-script/)
@@ -2,7 +2,7 @@
DHCP (Dynamic Host Configuration Protocol) automatically allocates IP addresses and network configuration to clients, ensuring unique addresses for each machine. In Linux, install with `sudo apt-get install isc-dhcp-server` and configure via `/etc/dhcp/dhcpd.conf`. DHCP servers require static IPs for effective management and can handle DNS and network data. The DHCP server effectively manages the IP addresses and information related to them, making sure that each client machine gets a unique IP and all the correct network information.
Visit the following sources to learn more:
Visit the following resources to learn more:
- [@article@Dynamic Host Configuration Protocol - Wikipedia](https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol)
- [@article@DHCP Protocol: How Dynamic Host Configuration Protocol Works](https://network-guides.com/dhcp-protocol/)
- [@article@DHCP Protocol: How Dynamic Host Configuration Protocol Works](https://network-guides.com/dhcp-protocol/)
@@ -2,18 +2,19 @@
In Linux, understanding the directory hierarchy is crucial for efficient navigation and file management. A Linux system's directory structure, also known as the Filesystem Hierarchy Standard (FHS), is a defined tree structure that helps to prevent files from being scattered all over the system and instead organise them in a logical and easy-to-navigate manner.
- `/`: Root directory, the top level of the file system.
- `/home`: User home directories.
- `/bin`: Essential binary executables.
- `/sbin`: System administration binaries.
- `/etc`: Configuration files.
- `/var`: Variable data (logs, spool files).
- `/usr`: User programs and data.
- `/lib`: Shared libraries.
- `/tmp`: Temporary files.
- `/opt`: Third-party applications.
* `/`: Root directory, the top level of the file system.
* `/home`: User home directories.
* `/bin`: Essential binary executables.
* `/sbin`: System administration binaries.
* `/etc`: Configuration files.
* `/var`: Variable data (logs, spool files).
* `/usr`: User programs and data.
* `/lib`: Shared libraries.
* `/tmp`: Temporary files.
* `/opt`: Third-party applications.
Visit the following resources to learn more:
- [@article@Linux Directory Structure Explained for Beginners](https://linuxhandbook.com/linux-directory-structure/)
- [@article@Overview of File System Hierarchy Standard (FHS)](https://access.redhat.com/documentation/ru-ru/red_hat_enterprise_linux/4/html/reference_guide/s1-filesystem-fhs#s3-filesystem-usr)
- [@video@The Linux File System Explained in 1,233 Seconds](https://youtu.be/A3G-3hp88mo?si=sTJTSzubdb0Vizjr)
- [@video@The Linux File System Explained in 1,233 Seconds](https://youtu.be/A3G-3hp88mo?si=sTJTSzubdb0Vizjr)
@@ -1,10 +1,10 @@
# Disks and Filesystems
Linux supports various filesystems like EXT4, FAT32, NTFS, and Btrfs for organizing data on storage devices. Each filesystem has specific advantages - EXT4 for Linux systems, FAT32 for compatibility across operating systems. The `df -T` command displays mounted filesystems with their types, sizes, and available space information.
Linux uses various filesystems to organize, store, and retrieve data from storage devices. Popular filesystems include EXT4 (robust for Linux volumes), FAT32 (compatible with all OS for removable media), NTFS, and Btrfs. Each has specific advantages and use cases. Use `df -T` command to display filesystem types, disk space usage, and mounted device information.
Visit the following resources to learn more:
- [@official@Filesystems in the Linux Kernel](https://www.kernel.org/doc/html/v6.16-rc2/filesystems/index.html)
- [@article@Partitions And Filesystems In Linux - Introduction](https://www.linuxfordevices.com/tutorials/linux/partitions-and-filesystems)
- [@article@Overview of File System Hierarchy Standard (FHS)](https://access.redhat.com/documentation/ru-ru/red_hat_enterprise_linux/4/html/reference_guide/s1-filesystem-fhs#s3-filesystem-usr)
- [@article@Understanding Linux Filesystems: Inodes, Block Sizes, and Data](https://www.linuxjournal.com/content/understanding-linux-filesystems-inodes-block-sizes-and-data-structures)
- [@article@Understanding Linux Filesystems: Inodes, Block Sizes, and Data](https://www.linuxjournal.com/content/understanding-linux-filesystems-inodes-block-sizes-and-data-structures)
@@ -4,7 +4,7 @@ Environment variables are dynamic named values that can affect the behavior of r
Environment variables help to contribute to the fantastic and customizable flexibility you see in Unix systems. They provide a simple way to share configuration settings between multiple applications and processes in Linux.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Environment Variables in Linux](https://labex.io/tutorials/linux-environment-variables-in-linux-385274)
- [@article@Linux Environment Variables List, Set, Create & Remove](https://www.computernetworkingnotes.com/linux-tutorials/linux-environment-variables-list-set-create-remove.html)
@@ -1,10 +1,10 @@
# Ethernet, ARP, and RARP
# Ethernet, ARP and RARP
Key networking protocols in Linux include Ethernet (LAN communication standard), ARP (Address Resolution Protocol - converts IP to MAC addresses), and RARP (Reverse ARP - converts MAC to IP addresses). These protocols enable local network communication and address resolution, essential for network troubleshooting and management in Linux systems.
Three crucial Linux networking components: Ethernet enables LAN device communication, ARP (Address Resolution Protocol) translates IP addresses to MAC addresses for direct network communication, and RARP (Reverse ARP) converts MAC addresses to IP addresses when devices know their MAC but need their IP. Essential for diagnosing and managing Linux networking issues.
Visit the following resources to learn more:
- [@article@A Comprehensive guide to Linux Networking](https://centlinux.com/linux-networking/)
- [@article@A Beginner's Guide to Linux Networking Fundamentals](https://dev.to/iaadidev/a-beginners-guide-to-linux-networking-fundamentals-dev-ops-prerequisite-7-434o)
- [@video@ARP Explained - Address Resolution Protocol](https://www.youtube.com/watch?v=cn8Zxh9bPio)
- [@video@What is Ethernet?](https://www.youtube.com/watch?v=HLziLmaYsO0)
- [@video@What is Ethernet?](https://www.youtube.com/watch?v=HLziLmaYsO0)
@@ -5,4 +5,4 @@ The `expand` command converts tabs to spaces in text files, useful for consisten
Visit the following resources to learn more:
- [@article@expand — Linux manual page](https://www.man7.org/linux/man-pages/man1/expand.1.html)
- [@article@How to Use the 'expand' Command (with examples)](https://commandmasters.com/commands/expand-common/)
- [@article@How to Use the 'expand' Command (with examples)](https://commandmasters.com/commands/expand-common/)
@@ -1,10 +1,22 @@
# File Permissions
# Linux File Permissions
Linux file permissions control read (r), write (w), and execute (x) access for owner, group, and others using octal or symbolic notation. Format `-rwxr--r--` shows file type and permissions. Use `chmod` to change permissions, `chown` for ownership, `chgrp` for group ownership. Essential for system security and proper access control.
In Linux systems, rights and privileges are assigned to files and directories in the form of permissions. These permissions indicate who can read, write, or execute (run) them. In Linux, there are three types of users: owners, groups, and others who can have a different set of permissions.
In fact, permissions on the system are there for a reason: to prevent unprivileged users from making changes on the system that would ultimately affect other users. With inadequate permissions, unprivileged users are able to make changes that would be beneficial or harmless to the Linux system.
Let's have a look at an example:
-rwxr--r-- 1 root root 4096 Jan 1 12:00 filename
From the above example, the first character `-` indicates if it is a regular file(`-`) or directory(`d`). The following group of three characters(`rwx`) represents the permissions for the file owner. The next three characters(`r--`) represent permissions for the group and the last set of three characters(`r--`) represents permissions for others.
The `r` indicates that the file can be read, `w` indicates that the file can be written to, and `x` indicates that the file can be executed.
The permissions can be changed using the `chmod`, `chown`, and `chgrp` commands.
Visit the following resources to learn more:
- [@article@Understanding Linux File Permissions](https://linuxize.com/post/understanding-linux-file-permissions/)
- [@article@Linux File Permissions](https://linuxhandbook.com/linux-file-permissions/)
- [@article@Linux Permissions of Files](https://labex.io/tutorials/linux-permissions-of-files-270252)
- [@video@Linux File Permissions in 5 Minutes](https://www.youtube.com/watch?v=LnKoncbQBsM)
@@ -7,4 +7,4 @@ Visit the following resources to learn more:
- [@article@How to Use Linux FTP Command to Transfer Files](https://linuxize.com/post/how-to-use-linux-ftp-command-to-transfer-files/)
- [@article@Rsync Command in Linux with Examples](https://linuxize.com/post/how-to-use-rsync-for-local-and-remote-data-transfer-and-synchronization/)
- [@article@Using scp Command in Linux](https://linuxhandbook.com/scp-command/)
- [@article@Wget Command in Linux with Examples](https://linuxize.com/post/wget-command-examples/)
- [@article@Wget Command in Linux with Examples](https://linuxize.com/post/wget-command-examples/)
@@ -6,4 +6,4 @@ Visit the following resources to learn more:
- [@official@Filesystems in the Linux Kernel](https://www.kernel.org/doc/html/v6.16-rc2/filesystems/index.html)
- [@article@df command in Linux (Check Disk Space)](https://linuxize.com/post/how-to-check-disk-space-in-linux-using-the-df-command/)
- [@article@Partitions And Filesystems In Linux - Introduction](https://www.linuxfordevices.com/tutorials/linux/partitions-and-filesystems)
- [@article@Partitions And Filesystems In Linux - Introduction](https://www.linuxfordevices.com/tutorials/linux/partitions-and-filesystems)
@@ -1,6 +1,6 @@
# Finding and Installing Packages
Linux package managers like `apt`, `yum`, and `dnf` automate software installation, updates, and removal. Use `apt-get update && apt-get install package-name` on Debian/Ubuntu systems or `dnf install package-name` on Fedora/CentOS. Package management eliminates manual compilation from source code and requires appropriate permissions (usually root access).
Linux package managers like `apt`, `yum`, and `dnf` automate software installation, upgrading, configuring, and removal. Debian-based systems: `sudo apt-get update && sudo apt-get install package-name`. Fedora/CentOS: `sudo dnf update && sudo dnf install package-name`. Package management eliminates manual compilation from source code. Root permissions required for installation.
Visit the following resources to learn more:
@@ -8,4 +8,4 @@ Visit the following resources to learn more:
- [@official@Yum Package Manager](http://yum.baseurl.org/)
- [@official@Using the DNF Software Package Manager](https://docs.fedoraproject.org/en-US/quick-docs/dnf/)
- [@article@Linux Package Manager Explained](https://geekflare.com/dev/linux-package-manager-explained/)
- [@article@8 Best Package Manager for Linux - LinuxSimply](https://linuxsimply.com/linux-basics/package-management/best-package-manager/)
- [@article@8 Best Package Manager for Linux](https://linuxsimply.com/linux-basics/package-management/best-package-manager/)
@@ -4,7 +4,7 @@ GREP (Global Regular Expression Print) is a powerful text search utility that fi
Visit the following resources to learn more:
- [@opensource@Ripgrep: GitHub Repository](https://github.com/BurntSushi/ripgrep)
- [@article@Grep and Regular Expressions for Beginners](https://ryanstutorials.net/linuxtutorial/grep.php)
- [@article@bgsu.edu: Advanced Grep Topics](https://caspar.bgsu.edu/~courses/Stats/Labs/Handouts/grepadvanced.htm)
- [@opensource@Ripgrep: GitHub Repository](https://github.com/BurntSushi/ripgrep)
- [@article@Linux grep Command: Pattern Searching](https://labex.io/tutorials/linux-linux-grep-command-pattern-searching-219192)
@@ -2,7 +2,7 @@
The `head` command in Linux is a text processing utility that allows a user to output the first part (or the "head") of files. It is commonly used for previewing the start of a file without loading the entire document into memory, which can act as an efficient way of quickly examining the data in very large files. By default, the `head` command prints the first 10 lines of each file to standard output, which is the terminal in most systems.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Head Command in Linux - 5 Essential Examples](https://linuxhandbook.com/head-command/)
- [@article@Linux head Command: File Beginning Display](https://labex.io/tutorials/linux-linux-head-command-file-beginning-display-214302)
@@ -2,7 +2,7 @@
Internet Control Message Protocol (ICMP) is a supportive protocol used by network devices to communicate error messages and operational information. Essential for Linux network troubleshooting, ICMP enables tools like `ping` and `traceroute` to diagnose network connectivity and routing issues. Use `ping www.google.com` to send ICMP echo requests and test network reachability effectively.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@icmp(7) — Linux manual page](https://www.man7.org/linux/man-pages/man7/icmp.7.html)
- [@article@Understanding ICMP Packets with Examples](https://www.howtouselinux.com/post/icmp-packets)
@@ -2,7 +2,7 @@
An inode (index node) is a data structure in Linux filesystems that stores metadata about files and directories except their names and actual data. Contains file size, owner, permissions, timestamps, and more. Each file has a unique inode number for identification. Understanding inodes helps with advanced operations like linking and file recovery. Use `ls -i filename` to view inode numbers.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Introduction to Inodes](https://linuxjourney.com/lesson/inodes)
- [@article@Index Nodes — The Linux Kernel documentation](https://www.kernel.org/doc/html/latest/filesystems/ext4/inodes.html?highlight=inode)
@@ -1,10 +1,3 @@
# Installing, Removing, and Upgrading Packages
# Install, Remove, and Upgrade Packages
Package management in Linux involves installing, removing, and upgrading software using distribution-specific tools. Use `apt` for Debian/Ubuntu, `yum`/`dnf` for Fedora/RHEL/CentOS, and `zypper` for SUSE. Common operations include `install package-name`, `remove package-name`, and `upgrade` commands. Each package manager has specific syntax but similar functionality for software lifecycle management.
Visit the following resources to learn more:
- [@official@APT Package Manager](https://www.debian.org/doc/manuals/apt-guide/index.en.html)
- [@official@Yum Package Manager](http://yum.baseurl.org/)
- [@official@Using the DNF Software Package Manager](https://docs.fedoraproject.org/en-US/quick-docs/dnf/)
- [@article@Linux Package Manager Explained](https://geekflare.com/dev/linux-package-manager-explained/)
Linux package management handles installing, removing, and upgrading pre-compiled software modules. Different distributions use specific package managers: `apt` (Debian/Ubuntu), `yum`/`dnf` (Fedora/RHEL/CentOS), `zypper` (SUSE). Example installation: `sudo apt-get install packagename`. Each manager has specific commands for removal and upgrades. Critical skill for effective Linux system administration.
@@ -2,7 +2,7 @@
`join` is a powerful text processing command in Linux. It lets you combine lines of two files on a common field, which works similar to the 'Join' operation in SQL. It's particularly useful when you're dealing with large volumes of data. Specifically, `join` uses the lines from two files to form lines that contain pairs of lines related in a meaningful way.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@join(1) — Linux manual page](https://www.man7.org/linux/man-pages/man1/join.1.html)
- [@article@join command in Linux with examples](https://linuxconfig.org/join)
@@ -2,7 +2,7 @@
The `kill` command terminates processes in Linux by sending signals to specific Process IDs (PIDs). Use `kill [signal] PID` to terminate processes manually. Different signals provide various termination methods - SIGTERM for graceful shutdown, SIGKILL for forced termination. Process termination is essential for managing unresponsive or unwanted processes.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Killing Processes](https://linuxjourney.com/lesson/killing-processes)
- [@article@Using Kill Command in Linux](https://linuxhandbook.com/kill-command/)
@@ -6,4 +6,4 @@ Visit the following resources to learn more:
- [@official@APT Package Manager](https://www.debian.org/doc/manuals/apt-guide/index.en.html)
- [@article@5 ways to list installed packages in Linux](https://www.howtouselinux.com/post/list-installed-packages-in-linux)
- [@article@Linux Package Manager Explained](https://geekflare.com/dev/linux-package-manager-explained/)
- [@article@Linux Package Manager Explained](https://geekflare.com/dev/linux-package-manager-explained/)
@@ -5,4 +5,4 @@ Shell literals are fixed values in source code including string literals (enclos
Visit the following resources to learn more:
- [@article@Bash Tutorial - Quoting literal text](https://riptutorial.com/bash/example/2465/quoting-literal-text)
- [@article@Handling Special Characters in Shell Scripts](https://www.baeldung.com/linux/special-characters-in-shell-scripts)
- [@article@Handling Special Characters in Shell Scripts](https://www.baeldung.com/linux/special-characters-in-shell-scripts)
@@ -5,4 +5,4 @@ Shell loops automate repetitive tasks with three types: `for` (iterates over lis
Visit the following resources to learn more:
- [@article@Using For, While and Until Loops in Bash](https://linuxhandbook.com/bash-loops/)
- [@article@Bash Loops with examples](https://linuxconfig.org/bash-loops-with-examples)
- [@article@Bash Loops with examples](https://linuxconfig.org/bash-loops-with-examples)
@@ -5,4 +5,4 @@ LVM provides logical volume management through device mapper framework, offering
Visit the following resources to learn more:
- [@article@The Complete Beginner's Guide to LVM in Linux](https://linuxhandbook.com/lvm-guide/)
- [@article@A Beginner's Guide to LVM in Linux - It's FOSS](https://itsfoss.com/lvm-guide/)
- [@article@A Beginner's Guide to LVM in Linux - It's FOSS](https://itsfoss.com/lvm-guide/)
@@ -1,9 +1,10 @@
# Managing Permissions
# Permissions
Linux file permissions control access to files and directories using read, write, and execute rights for user, group, and others. Use `chmod` to change permissions, `chown` to change ownership, and `chgrp` to change group ownership. Proper permission management is essential for system security and prevents unauthorized access to sensitive files and directories.
Linux permissions control file and directory access for users, groups, and others with read, write, and execute types. Commands include `chmod` (change permissions), `chown` (change owner), and `chgrp` (change group). Proper permission management is crucial for system security and organization. Essential for maintaining controlled access to system resources.
Visit the following resources to learn more:
- [@article@Linux File Permissions and Ownership Explained](https://linuxhandbook.com/linux-file-permissions/)
- [@article@Linux File Permissions Explained](https://www.redhat.com/sysadmin/linux-file-permissions-explained)
- [@video@Linux File Permissions in 5 minutes](https://www.youtube.com/watch?v=LnKoncbQBsM)
- [@article@Understanding Linux File Permissions](https://linuxize.com/post/understanding-linux-file-permissions/)
- [@article@Linux File Permissions](https://linuxhandbook.com/linux-file-permissions/)
- [@article@Linux Permissions of Files](https://labex.io/tutorials/linux-permissions-of-files-270252)
- [@video@Linux File Permissions in 5 Minutes](https://www.youtube.com/watch?v=LnKoncbQBsM)
@@ -4,6 +4,6 @@ Mounting in Linux attaches filesystems to specific directories (mount points) in
Visit the following resources to learn more:
- [@official@The `mount` command manual page](https://man7.org/linux/man-pages/man8/mount.8.html)
- [@official@The mount command manual page](https://man7.org/linux/man-pages/man8/mount.8.html)
- [@article@Mounting, unmounting and the /mnt directory - The Linux Documentation Project](https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/mnt.html)
- [@article@Linux `mount` command with Examples](https://phoenixnap.com/kb/linux-mount-command)
- [@article@Linux mount command with Examples](https://phoenixnap.com/kb/linux-mount-command)
@@ -1,8 +1,8 @@
# Moving Files and Directories
# Moving Files
The `mv` command moves files and directories between locations and can also rename them. Use syntax `mv [options] source destination` where source is the file/directory to move and destination is the target location. This versatile command is essential for file organization and management in Linux systems.
In Linux, moving files is an essential task that you will need to perform quite frequently. The `mv` command, short for move, is used to move files and directories from one location to another. The `mv` command can also be used for renaming files in Linux.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@mv command](https://linuxhandbook.com/mv-command/)
- [@article@mv Cheat Sheet](https://www.commandinline.com/cheat-sheet/mv/)
@@ -4,8 +4,8 @@ In Linux, navigation between directories and files is a fundamental, yet essenti
Visit the following resources to learn more:
- [@article@Linux Filesystem Navigation Basics](https://linuxconfig.org/filesystem-basics)
- [@article@Basic Navigation Commands: `cd`, `ls`, and `pwd`](https://www.linuxbash.sh/post/basic-navigation-commands-cd-ls-and-pwd)
- [@article@Practice on Linux Fundamentals](https://linuxjourney.com/)
- [@video@Linux fundamentals](https://www.youtube.com/watch?v=kPylihJRG70&t=1381s&ab_channel=TryHackMe)
- [@course@Linux for Noobs (Hands-on)](https://labex.io/courses/linux-for-noobs)
- [@article@Linux Filesystem Navigation Basics](https://linuxconfig.org/filesystem-basics)
- [@article@Basic Navigation Commands: cd, ls, and pwd](https://www.linuxbash.sh/post/basic-navigation-commands-cd-ls-and-pwd)
- [@article@Practice on Linux Fundamentals](https://linuxjourney.com/)
- [@video@Linux fundamentals](https://www.youtube.com/watch?v=kPylihJRG70&t=1381s&ab_channel=TryHackMe)
@@ -5,4 +5,4 @@ Netfilter is a Linux kernel framework for manipulating and filtering network pac
Visit the following resources to learn more:
- [@official@netfilter/iptables project homepage](https://netfilter.org/)
- [@article@Packet filtering in Linux - iptables, nftables and firewalld](https://wyssmann.com/blog/2021/07/packet-filtering-in-linux-iptables-nftables-and-firewalld/)
- [@article@Packet filtering in Linux - iptables, nftables and firewalld](https://wyssmann.com/blog/2021/07/packet-filtering-in-linux-iptables-nftables-and-firewalld/)
@@ -5,4 +5,4 @@ Netstat is a command-line tool for network troubleshooting and performance measu
Visit the following resources to learn more:
- [@article@Netstat Command in Linux](https://linuxhandbook.com/netstat-command/)
- [@article@How to Use netstat on Linux](https://www.howtogeek.com/513003/how-to-use-netstat-on-linux/)
- [@article@How to Use netstat on Linux](https://www.howtogeek.com/513003/how-to-use-netstat-on-linux/)
@@ -6,4 +6,4 @@ Visit the following resources to learn more:
- [@article@A Comprehensive Guide to Linux Networking](https://centlinux.com/linux-networking/)
- [@article@A Beginner's Guide to Linux Networking Fundamentals](https://dev.to/iaadidev/a-beginners-guide-to-linux-networking-fundamentals-dev-ops-prerequisite-7-434o)
- [@article@Practice on Networking Fundamentals](https://linuxjourney.com/lesson/network-basics)
- [@article@Practice on Networking Fundamentals](https://linuxjourney.com/lesson/network-basics)
@@ -2,7 +2,7 @@
The `nl` command numbers lines in text files, providing an overview of line locations. By default, it numbers only non-empty lines, but this behavior can be modified. Syntax: `nl [options] [file_name]`. If no file is specified, nl reads from stdin. Valuable for text processing when line numbers are needed for reference or debugging purposes.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@nl command](https://www.computerhope.com/unix/nl.htm)
- [@article@Linux nl Command: Line Numbering](https://labex.io/tutorials/linux-linux-nl-command-line-numbering-210988)
@@ -1,6 +1,6 @@
# Package Repositories
# Repositories
Package repositories are storage locations containing software packages for Linux distributions. They enable easy installation, updates, and dependency management through package managers like apt, yum, or dnf. Each distribution has pre-configured repositories with tested, secure packages. Use commands like `apt update` or `yum update` to sync with repositories.
Repositories are storage locations containing collections of software packages for Linux distributions. They store thousands of compiled packages specific to each distribution (.deb for Debian/Ubuntu, .rpm for Fedora/CentOS). Repositories ensure secure, tested software with proper dependencies. Update commands: `sudo apt update` (Ubuntu), `sudo yum update` (CentOS/Fedora). Essential for secure software management.
Visit the following resources to learn more:
@@ -6,4 +6,4 @@ Visit the following resources to learn more:
- [@article@How to Capture and Analyze Packets with tcpdump](https://www.debian.org/doc/manuals/apt-guide/index.en.html)
- [@article@Mastering Network Traffic Analysis in Linux](https://en.ittrip.xyz/linux/linux-network-analysis)
- [@article@16 Best Free and Open Source Network Analyzers](https://www.linuxlinks.com/best-free-open-source-network-analyzers/)
- [@article@16 Best Free and Open Source Network Analyzers](https://www.linuxlinks.com/best-free-open-source-network-analyzers/)
@@ -5,4 +5,4 @@ In Linux, paste is a powerful text processing utility that is primarily used for
Visit the following resources to learn more:
- [@article@Paste Command in Linux (Merge Lines)](https://linuxize.com/post/paste-command-in-linux/)
- [@article@7 Practical Usage of Paste Command in Linux](https://linuxhandbook.com/paste-command/)
- [@article@7 Practical Usage of Paste Command in Linux](https://linuxhandbook.com/paste-command/)
@@ -1,8 +1,8 @@
# Ping
The `ping` command is essential for Linux network troubleshooting, checking connectivity between your host and target machines. It sends ICMP ECHO_REQUEST packets and listens for ECHO_RESPONSE returns, providing insights into connection health and speed. Use `ping <target IP or hostname>` to diagnose network connectivity issues and identify reachability problems efficiently.
The `ping` command is essential for Linux network troubleshooting, checking connectivity between your host and target machines. It sends ICMP ECHO\_REQUEST packets and listens for ECHO\_RESPONSE returns, providing insights into connection health and speed. Use `ping <target IP or hostname>` to diagnose network connectivity issues and identify reachability problems efficiently.
Visit the following resources to learn more:
- [@article@Ping Command in Linux](https://linuxize.com/post/linux-ping-command/)
- [@article@Ping Command Examples in Linux - It's FOSS](https://itsfoss.com/ping-command/)
- [@article@Ping Command Examples in Linux - It's FOSS](https://itsfoss.com/ping-command/)
@@ -4,9 +4,8 @@ The pipe (`|`) is a powerful feature in Linux used to connect two or more comman
Here is a simple example of piping two commands, `ls` and `grep`, to list all the text files in the current directory:
```bash
ls | grep '\.txt$'
```
ls | grep '\.txt$'
In this example, `ls` lists the files in the current directory and `grep '\.txt$'` filters out any files that don't end with `.txt`. The pipe command, `|`, takes the output from `ls` and uses it as the input to `grep '\.txt$'`. The output of the entire command is the list of text files in the current directory.
@@ -5,4 +5,4 @@ Linux treats every running program as a process. Process management commands hel
Visit the following resources to learn more:
- [@article@The Complete Guide to Process Management Commands](https://thelinuxcode.com/process-management-commands-linux/)
- [@article@Commands for Process Management in Linux](https://www.digitalocean.com/community/tutorials/process-management-in-linux)
- [@article@Commands for Process Management in Linux](https://www.digitalocean.com/community/tutorials/process-management-in-linux)
@@ -2,7 +2,7 @@
Linux assigns priority levels to processes, affecting execution timing and resource allocation. Process priorities use "nice" values ranging from -20 (highest priority) to +19 (lowest priority) and only root can set negative nice value. The `/proc` filesystem contains process information including priorities. You can view priorities with `ps -eo pid,pri,user,comm` and modify them using `renice` command.
Visit the following resource to learn more:
Visit the following resources to learn more:
- [@article@Understanding Process Thread Priorities in Linux](https://blogs.oracle.com/linux/post/task-priority)
- [@article@How To Manipulate Process Priority In Linux](https://www.itsmarttricks.com/how-to-manipulate-process-priority-in-linux-using-nice-and-renice-commands/)
- [@article@How To Manipulate Process Priority In Linux](https://www.itsmarttricks.com/how-to-manipulate-process-priority-in-linux-using-nice-and-renice-commands/)
@@ -6,4 +6,4 @@ Visit the following resources to learn more:
- [@article@Process signals](https://linuxjourney.com/lesson/process-signals)
- [@article@Understanding Linux Process Signals](https://www.ceos3c.com/linux/understanding-linux-process-signals-a-complete/)
- [@article@Linux Process Signals and their meaning](https://linux-audit.com/processes/linux-process-signals/)
- [@article@Linux Process Signals and their meaning](https://linux-audit.com/processes/linux-process-signals/)
@@ -2,12 +2,12 @@
The shell in Linux provides a robust way of managing input and output streams of a command or program, this mechanism is known as Redirection. Linux being a multi-user and multi-tasking operating system, every process typically has 3 streams opened:
- Standard Input (stdin) - This is where the process reads its input from. The default is the keyboard.
- Standard Output (stdout) - The process writes its output to stdout. By default, this means the terminal.
- Standard Error (stderr) - The process writes error messages to stderr. This also goes to the terminal by default.
* Standard Input (stdin) - This is where the process reads its input from. The default is the keyboard.
* Standard Output (stdout) - The process writes its output to stdout. By default, this means the terminal.
* Standard Error (stderr) - The process writes error messages to stderr. This also goes to the terminal by default.
Visit the following resources to learn more:
- [@article@Input Output & Error Redirection in Linux](https://linuxhandbook.com/redirection-linux/)
- [@article@Redirections (Bash Reference Manual)](https://www.gnu.org/software/bash/manual/html_node/Redirections.html)
- [@article@Redirections in Linux with Examples](https://linuxopsys.com/redirections-in-linux-with-examples)
- [@article@Redirections in Linux with Examples](https://linuxopsys.com/redirections-in-linux-with-examples)
@@ -1,9 +1,9 @@
# Service Management
Service management in Linux controls system daemons during boot/shutdown processes. Modern Linux distributions use systemd for service management with commands like `systemctl start/stop/restart/status/enable/disable`. Services perform various background functions independent of user interfaces. Effective service management is essential for system stability and security.
Service management controls Linux services (daemons) during boot and shutdown processes. Common systemctl commands include start, stop, restart, reload, status, enable/disable. Modern Linux uses systemd while older systems use SystemV or Upstart. Example: `sudo systemctl start sshd` starts SSH service. Essential skill for Linux system administration and maintaining secure, stable systems.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Service Management in Linux: A Comprehensive Guide](https://medium.com/@thesureshvadde/service-management-in-linux-a-comprehensive-guide-cb4c7e81dfa9)
- [@article@How to Master Linux Service Management with Systemctl](https://labex.io/tutorials/linux-how-to-master-linux-service-management-with-systemctl-392864)
- [@article@Service Management in Linux: A Comprehensive Guide](https://medium.com/@thesureshvadde/service-management-in-linux-a-comprehensive-guide-cb4c7e81dfa9)
- [@article@How to Manage Services in Linux: systemd and SysVinit](https://dev.to/iaadidev/how-to-manage-services-in-linux-systemd-and-sysvinit-essentials-devops-prerequisite-8-1jop)
@@ -2,7 +2,7 @@
Linux servers run various services including web, database, DNS, and mail servers. System administrators use tools like `systemctl`, `service`, `netstat`, `ss`, and `lsof` to manage and monitor services. Use `systemctl --type=service` to list all active services with their status. Essential for server management, resource monitoring, and troubleshooting.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@How to List Linux Services With systemctl](https://www.howtogeek.com/839285/how-to-list-linux-services-with-systemctl/)
- [@article@Service Management in Linux: A Comprehensive Guide](https://medium.com/@thesureshvadde/service-management-in-linux-a-comprehensive-guide-cb4c7e81dfa9)
@@ -2,8 +2,8 @@
The Linux shell is a command-line interface that acts as an intermediary between users and the system kernel. Common shells include Bash, sh, and csh. Basic operations involve navigating directories, creating/deleting files, and executing commands. Shell knowledge is fundamental for Linux administration, scripting, and automation tasks.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Learning The Shell](https://www.linuxcommand.org/lc3_lts0010.php)
- [@article@What is a Shell in Linux](https://linuxsimply.com/what-is-a-shell-linux/)
- [@article@Learn Linux Easily](https://linuxjourney.com)
- [@article@Learn Linux Easily](https://linuxjourney.com)
@@ -7,4 +7,4 @@ Visit the following resources to learn more:
- [@article@Learn Shell - Free Interactive Shell Tutorial](https://www.learnshell.org/)
- [@article@Bash Scripting Tutorial Series for Beginners](https://linuxhandbook.com/bash/)
- [@article@Linux Bash Shell Scripting Tutorial Wiki](https://bash.cyberciti.biz/guide/Main_Page)
- [@video@Bash Scripting on Linux - YT Playlist](https://youtube.com/playlist?list=PLT98CRl2KxKGj-VKtApD8-zCqSaN2mD4w&si=MSehStqnhSqgoMSj)
- [@video@Bash Scripting on Linux - YT Playlist](https://youtube.com/playlist?list=PLT98CRl2KxKGj-VKtApD8-zCqSaN2mD4w&si=MSehStqnhSqgoMSj)
@@ -5,4 +5,4 @@ Snap is a modern Linux package management system by Canonical providing self-con
Visit the following resources to learn more:
- [@article@The "snap" Command in Linux](https://linuxsimply.com/snap-command-in-linux/)
- [@article@How to Install and Use Snap in Various Linux Distributions](https://itsfoss.com/install-snap-linux/)
- [@article@How to Install and Use Snap in Various Linux Distributions](https://itsfoss.com/install-snap-linux/)
@@ -6,4 +6,4 @@ Visit the following resources to learn more:
- [@article@Hard links and Soft links in Linux Explained](https://www.redhat.com/en/blog/linking-linux-explained)
- [@article@Difference between hard link and soft link](https://kerneltalks.com/commands/difference-between-hard-link-and-soft-link/)
- [@article@How to Understand the Difference between Hard and Symbolic Links in Linux](https://labex.io/tutorials/linux-how-to-understand-the-difference-between-hard-and-symbolic-links-in-linux-409929)
- [@article@How to Understand the Difference between Hard and Symbolic Links in Linux](https://labex.io/tutorials/linux-how-to-understand-the-difference-between-hard-and-symbolic-links-in-linux-409929)
@@ -2,7 +2,7 @@
Linux provides a variety of tools for processing and manipulating text files, one of which is the sort command. The `sort` command in Linux is used to sort the contents of a text file, line by line. The command uses ASCII values to sort files. You can use this command to sort the data in a file in a number of different ways such as alphabetically, numerically, reverse order, or even monthly. The sort command takes a file as input and prints the sorted content on the standard output (screen).
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Sort Command in Linux - 10 Useful Examples](https://linuxhandbook.com/sort-command/)
- [@article@Sort Command in Linux with Practical Examples](https://tecadmin.net/linux-sort-command/)
@@ -2,7 +2,7 @@
Linux provides an extensive set of tools for manipulating text data. One of such utilities is the `split` command that is used, as the name suggests, to split large files into smaller files. The `split` command in Linux divides a file into multiple equal parts, based on the lines or bytes specified by the user.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Split Command in Linux: 9 Useful Examples](https://linuxhandbook.com/split-command/)
- [@article@Split Command in Linux: Usage Guide with Examples](https://ioflood.com/blog/split-linux-command/)
- [@article@Split Command in Linux: Usage Guide with Examples](https://ioflood.com/blog/split-linux-command/)
@@ -2,7 +2,7 @@
SSH (Secure Shell) is a cryptographic network protocol providing secure remote access, command execution, and data communication between networked computers. Replaces insecure protocols like Telnet with confidentiality, integrity, and security. Use `ssh username@server_ip_address` to connect to remote Linux servers. Essential for secure system administration and remote management.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Secure Shell](https://en.wikipedia.org/wiki/Secure_Shell)
- [@article@Mastering SSH - A Complete Guide to Secure Shell Protocol](https://www.socketxp.com/iot/ssh-secure-shell/)
@@ -1,9 +1,9 @@
# Checking Service Logs
# Starting / Stopping Services
System logs are essential for troubleshooting and monitoring Linux systems. Most logs are stored in `/var/log` directory and managed by systemd. Use `journalctl` to view system logs and `journalctl -u service_name` for specific service logs. The `dmesg` command displays kernel messages. Regular log monitoring is crucial for system administration.
Linux service management controls system services like firewall, network, and database using `systemctl` commands. Basic operations: `sudo systemctl start service_name` (start), `sudo systemctl stop service_name` (stop), `sudo systemctl restart service_name` (restart). Root permissions required. Essential for system administrators managing updates and configuration changes.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@How to Use journalctl Command to Analyze Logs in Linux](https://linuxhandbook.com/journalctl-command/)
- [@article@journalctl — Linux manual page](https://www.man7.org/linux/man-pages/man1/journalctl.1.html)
- [@article@Linux Log Files Location & How To View Logs Files](https://www.cyberciti.biz/faq/linux-log-files-location-and-how-do-i-view-logs-files/)
- [@article@Service Management in Linux: A Comprehensive Guide](https://medium.com/@thesureshvadde/service-management-in-linux-a-comprehensive-guide-cb4c7e81dfa9)
- [@article@How to Master Linux Service Management with Systemctl](https://labex.io/tutorials/linux-how-to-master-linux-service-management-with-systemctl-392864)
- [@article@How to Manage Services in Linux: systemd and SysVinit](https://dev.to/iaadidev/how-to-manage-services-in-linux-systemd-and-sysvinit-essentials-devops-prerequisite-8-1jop)
@@ -1,9 +1,9 @@
# Data Streams: Stdout, Stdin, and Stderr
# Stdout, Stdin, and Stderr
Linux processes use three standard data streams: STDIN (input), STDOUT (output), and STDERR (error messages). STDOUT handles normal command output while STDERR specifically handles error messages. You can redirect these streams using operators like `>` for stdout and `2>` for stderr, allowing separate handling of normal output and errors for better scripting and debugging.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Linux Fundamentals - I/O, Standard Streams, and Redirection](https://www.putorius.net/linux-io-file-descriptors-and-redirection.html)
- [@article@Understanding 'stdin', 'stdout' and 'stderr' in Linux](https://www.slingacademy.com/article/understanding-stdin-stdout-and-stderr-in-linux/)
- [@article@Working with data streams on the Linux command line](https://opensource.com/article/18/10/linux-data-streams)
- [@article@Working with data streams on the Linux command line](https://opensource.com/article/18/10/linux-data-streams)
@@ -2,7 +2,7 @@
Subnetting divides networks into smaller subnets to improve performance and security in Linux networking. It organizes IP addresses within IP addressing schemes, preventing conflicts and efficiently utilizing address ranges. Use `route -n` to view routing tables and `route add -net xxx.xxx.xxx.x/xx gw yyy.yyy.yyy.y` to add subnets. Essential for complex networking environments.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Understanding IP Addressing and Subnetting in Linux](https://useful.codes/understanding-ip-addressing-and-subnetting-in-linux/)
- [@article@The Basics of IP Subnetting | Linux Journal](https://www.linuxjournal.com/article/6287)
@@ -4,7 +4,7 @@ The Super User, also known as "root user", represents a user account in Linux wi
The usage of super user is critical to operating a Linux system properly and safely as it can potentially cause serious damage. The super user can be accessed through the `sudo` or `su` commands.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Linux Superuser Access, Explained](https://www.redhat.com/en/blog/linux-superuser-access/)
- [@article@Difference between the root user and super (sudo) user](https://www.computernetworkingnotes.com/linux-tutorials/difference-between-the-root-user-and-super-sudo-user.html)
@@ -2,7 +2,7 @@
Swap space extends physical memory by using disk storage when RAM is full. Inactive memory pages move to swap, freeing RAM but with performance impact due to slower disk access. Swap can exist as dedicated partitions or regular files. Create with `fallocate`, `mkswap`, and `swapon` commands. Critical for memory management and system stability optimization.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Swap - Arch Wiki](https://wiki.archlinux.org/title/Swap)
- [@article@How to Increase Swap Space on Linux](https://linuxconfig.org/how-to-increase-swap-space-on-linux)
@@ -2,7 +2,7 @@
The `tail` command in Linux is a utility used in text processing. Fundamentally, it's used to output the last part of the files. The command reads data from standard input or from a file and outputs the last `N` bytes, lines, blocks, characters or words to the standard output (or a different file). By default, `tail` returns the last 10 lines of each file to the standard output. This command is common in situations where the user is interested in the most recent entries in a text file, such as log files.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@5 Practical Examples of Tail Command in Linux](https://linuxhandbook.com/tail-command/)
- [@article@Linux Tail Command | Linuxize](https://linuxize.com/post/linux-tail-command/)
@@ -2,7 +2,7 @@
TCP/IP (Transmission Control Protocol/Internet Protocol) is the foundational networking protocol suite that enables computer communication over networks. It consists of four layers: Network Interface, Internet, Transport, and Application. In Linux, TCP/IP is integral to the OS functionality, allowing hosts to connect and transfer data across same or different networks.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@TCP/IP Commands for Linux](https://whatismyipaddress.com/tcp-ip-commands-linux)
- [@article@Netstat Command in Linux](https://phoenixnap.com/kb/netstat-command)
@@ -2,7 +2,7 @@
The `tee` command reads from standard input and writes to both standard output and files simultaneously, like a T-splitter in plumbing. It enables users to view results in the terminal while saving output to files concurrently. Syntax: `command | tee file`. Extremely useful for documenting terminal activities and preserving command outputs for later analysis.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Tee Command in Linux Explained with Examples](https://linuxhandbook.com/tee-command/)
- [@article@Linux Tee Command](https://linuxize.com/post/linux-tee-command/)
- [@article@Linux Tee Command](https://linuxize.com/post/linux-tee-command/)
@@ -7,4 +7,4 @@ Visit the following resources to learn more:
- [@article@Common Linux Text Processing Commands](https://www.commandinline.com/linux/common-linux-text-processing-commands/)
- [@article@Linux Filters](https://ryanstutorials.net/linuxtutorial/filters.php)
- [@article@Linux Text Processing Command](https://earthly.dev/blog/linux-text-processing-commands/)
- [@article@Master Linux Text Processing Commands](https://everythingdevops.dev/linux-text-processing-commands/)
- [@article@Master Linux Text Processing Commands](https://everythingdevops.dev/linux-text-processing-commands/)
@@ -2,7 +2,7 @@
The `tr` command in Linux is a command-line utility that translates or substitutes characters. It reads from the standard input and writes to the standard output. Although commonly used for translation applications, `tr` has versatile functionality in the text processing aspect of Linux. Ranging from replacing a list of characters, to deleting or squeezing character repetitions, `tr` presents a robust tool for stream-based text manipulations.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@tr Command in Linux: 6 Useful Examples](https://linuxhandbook.com/tr-command/)
- [@article@Linux tr Command: Character Translating](https://labex.io/tutorials/linux-linux-tr-command-character-translating-388064)
@@ -2,7 +2,7 @@
Traceroute is a Linux network diagnostic tool that displays the path packets take from your system to a destination. It identifies routing problems, measures latency, and reveals network structure as packets traverse the internet. Each hop is tested multiple times with round-trip times displayed. Use `traceroute www.example.com` to discover packet routes and diagnose failures.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@traceroute Command Examples in Linux](https://linuxhandbook.com/traceroute/)
- [@article@How to Use the traceroute Command on Linux](https://www.howtogeek.com/657780/how-to-use-the-traceroute-command-on-linux/)
@@ -2,7 +2,7 @@
Linux troubleshooting involves identifying and resolving system errors, hardware/software issues, network problems, and resource management challenges. Key skills include using command-line tools, inspecting log files, understanding processes, and interpreting error messages. Tools like `top` provide real-time process monitoring to identify resource-heavy processes causing performance issues efficiently.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Troubleshooting Linux Problems: A Beginner's Guide](https://learn.redhat.com/t5/Platform-Linux/Troubleshooting-Linux-Problems-A-Beginner-s-Guide/td-p/36236)
- [@article@Linux Top 20 Important Commands for Monitoring and Troubleshooting](https://medium.com/@stepstodevops/linux-top-20-important-commands-for-monitoring-and-troubleshooting-a-comprehensive-guide-for-cd5aaa37da17)
@@ -2,7 +2,7 @@
Ulimits (user limits) are Linux kernel features that restrict resources like file handles and memory that processes can consume. In containerization, ulimits prevent rogue processes from exhausting server resources and creating denial-of-service situations. Use `ulimit -a` to view current limits and `ulimit -n 1024` to set specific limits for optimal container performance and security.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Check and set user limits with ulimit Linux command](https://linuxconfig.org/limit-user-environment-with-ulimit-linux-command)
- [@article@How to Use Ulimit Command in Linux](https://linuxhandbook.com/ulimit-command/)
@@ -2,7 +2,7 @@
The `unexpand` command converts spaces to tabs in text files, making documents more coherent and neat. Commonly used in programming scripts where tab indentation is preferred. Use `unexpand -t 4 file.txt` to replace every four spaces with a tab. Opposite of `expand` command, useful for standardizing indentation formatting in code files.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@unexpand Cheat Sheet](https://www.commandinline.com/cheat-sheet/unexpand/)
- [@article@Master the Linux 'unexpand' Command: A Comprehensive Guide](https://hopeness.medium.com/master-the-linux-unexpand-command-a-comprehensive-guide-6966c1f90acb)
@@ -2,7 +2,7 @@
`uniq` is an extremely useful command-line program for text processing. It aids in the examination and manipulation of text files by comparing or filtering out repeated lines that are adjacent. Whether you're dealing with a list of data or a large text document, the `uniq` command allows you to find and filter out duplicate lines, or even provide a count of each unique line in a file. It's important to remember that `uniq` only removes duplicates that are next to each other, so to get the most out of this command, data is often sorted using the `sort` command first.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Uniq Command in Unix and Linux: 7 Essential Examples](https://linuxhandbook.com/uniq-command/)
- [@article@Linux uniq Command: Duplicate Filtering](https://labex.io/tutorials/linux-linux-uniq-command-duplicate-filtering-219199)
@@ -1,9 +1,9 @@
# Uptime and Load
The `uptime` command shows how long a Linux system has been running and the system load average. Load average indicates computational work and CPU queue length, displayed for 1, 5, and 15-minute intervals. High load averages suggest resource constraints or performance issues. Regular monitoring helps identify usage patterns and plan capacity.
The `uptime` command shows system running time and load averages for 1, 5, and 15-minute intervals. Load average indicates computational work and processes waiting for CPU time. High load suggests insufficient resources or misconfigurations. Example: `uptime` shows "2 days, 20 min" uptime and "0.00, 0.01, 0.05" load averages. Essential for performance monitoring and capacity planning.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Linux Uptime Command With Usage Examples](https://www.tecmint.com/linux-uptime-command-examples/)
- [@article@How to Check Uptime in Linux Command Line](https://linuxhandbook.com/uptime-command/)
- [@article@Linux Load Average: What is Load Average in Linux?](https://www.digitalocean.com/community/tutorials/load-average-in-linux)
- [@article@Linux Load Average: What is Load Average in Linux?](https://www.digitalocean.com/community/tutorials/load-average-in-linux)
@@ -2,7 +2,7 @@
Linux user management allows multiple users to interact with the system in isolation. Includes creating, deleting, modifying users and groups, assigning permissions and ownership. Key commands: `adduser`/`useradd` creates users, `deluser`/`userdel` removes users, `passwd` manages passwords, `su` switches users. Essential for providing proper accessibility and maintaining Linux system security.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@User Account Management](https://labex.io/tutorials/linux-user-account-management-49)
- [@article@Creating, Modifying, and Deleting User Accounts](https://serveracademy.com/courses/linux-server-administration/creating-modifying-and-deleting-user-accounts/)
@@ -2,7 +2,7 @@
User management in Linux uses groups to organize users and manage permissions efficiently. Groups are collections of users that simplify system administration by controlling access to resources like files and directories. Users can belong to multiple groups, enabling precise privilege management. Commands like `groupadd`, `groupdel`, `groupmod`, `usermod`, and `gpasswd` manage groups effectively. Proper group management is crucial for a secure and organized system environment.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@How to create, delete, and modify groups in Linux](https://www.redhat.com/sysadmin/linux-groups)
- [@article@How to Manage Groups on Linux](https://linuxconfig.org/how-to-manage-groups-on-linux)
@@ -2,8 +2,8 @@
Shell variables store system or user-defined data that can change during script execution. Two categories exist: System Variables (PATH, HOME, PWD) created by Linux, and User-Defined Variables created by users. Define variables with `=` operator and retrieve values with `$` prefix. Example: `MY_VARIABLE="Hello World"` then `echo $MY_VARIABLE` prints the value.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Learning The Shell](https://www.linuxcommand.org/lc3_lts0010.php)
- [@article@How to Use Variables in Bash Shell Scripts](https://linuxhandbook.com/bash-variables/)
- [@article@How To Read and Set Environmental and Shell Variables](https://www.digitalocean.com/community/tutorials/how-to-read-and-set-environmental-and-shell-variables-on-linux)
- [@article@How To Read and Set Environmental and Shell Variables](https://www.digitalocean.com/community/tutorials/how-to-read-and-set-environmental-and-shell-variables-on-linux)
@@ -4,14 +4,14 @@ Vim (Vi Improved) is a powerful and flexible text editor used in Unix-like syste
Vim operates primarily in three modes:
- Normal (for navigation and manipulation).
- Insert (for editing text).
- Command (for executing commands).
* Normal (for navigation and manipulation).
* Insert (for editing text).
* Command (for executing commands).
Learn more from the following resources:
Visit the following resources to learn more:
- [@course@Learn Vimscript The Hard Way](https://learnvimscriptthehardway.stevelosh.com/)
- [@article@Vim Cheat Sheet](https://vim.rtorr.com/)
- [@article@Learn Vim Progressively](https://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/)
- [@article@Platform to practice Vim](https://vim-adventures.com/)
- [@video@Vim Basics](https://www.youtube.com/watch?v=wACD8WEnImo&list=PLT98CRl2KxKHy4A5N70jMRYAROzzC2a6x&ab_channel=LearnLinuxTV)
- [@course@Learn Vimscript The Hard Way](https://learnvimscriptthehardway.stevelosh.com/)
- [@video@Vim Basics](https://www.youtube.com/watch?v=wACD8WEnImo&list=PLT98CRl2KxKHy4A5N70jMRYAROzzC2a6x&ab_channel=LearnLinuxTV)
@@ -2,7 +2,7 @@
The `wc` command is a commonly used tool in Unix or Linux that allows users to count the number of bytes, characters, words, and lines in a file or in data piped from standard input. The name `wc` stands for 'word count', but it can do much more than just count words. Common usage of `wc` includes tracking program output, counting code lines, and more. It's an invaluable tool for analyzing text at both granular and larger scales.
Learn more from the following resources:
Visit the following resources to learn more:
- [@article@Wc Command in Linux (Count Number of Lines, Words, and Characters)](https://linuxize.com/post/linux-wc-command/)
- [@article@wc Command Examples - Linux Handbook](https://linuxhandbook.com/wc-command/)
@@ -1,7 +1,6 @@
# Working with Files
Working with files is an essential part of Linux and it's a skill every Linux user must have. In Linux, everything is considered a file: texts, images, systems, devices, and directories.
Linux provides multiple command-line utilities to create, view, move or search files. Some of the basic commands for file handling in Linux terminal include `touch` for creating files, `mv` for moving files, `cp` for copying files, `rm` for removing files, and `ls` for listing files and directories.
Working with files is an essential part of Linux and it's a skill every Linux user must have. In Linux, everything is considered a file: texts, images, systems, devices, and directories. Linux provides multiple command-line utilities to create, view, move or search files. Some of the basic commands for file handling in Linux terminal include `touch` for creating files, `mv` for moving files, `cp` for copying files, `rm` for removing files, and `ls` for listing files and directories.
Visit the following resources to learn more: