Enhancing Skills

Category: Operating System

which: Locate executable

The which command in Linux is used to locate the executable file associated with a given command in your system’s PATH. It returns the path of the executable that would have been executed if the command had been entered at the command line. Syntax Example Usage Output: Output: Output: Options […] Read more »

logrotate: Log Rotation in Linux

Overview Log rotation is the process of automatically managing the growth of log files. In Linux, the logrotate utility is commonly used to handle log rotation. It helps to compress, rename, delete, and manage log files, ensuring that they don’t consume excessive disk space and that the system maintains a […] Read more »

Learning Linux: Mastering the Essentials

My son has recently developed an interest in learning Linux, which inspired me to delve deeper into the system myself. Linux offers a rich environment for understanding the foundations of computing, from basic commands to advanced scripting. This collection of articles serves as a guide for anyone looking to master […] Read more »

Bash Shell Scripting: A Comprehensive Guide

Bash (Bourne Again SHell) is a popular Unix shell and command language. Writing shell scripts allows you to automate tasks and manage system processes efficiently. This guide covers basic concepts, common commands, and provides sample scripts to get you started. 1. Introduction to Bash Scripts A Bash script is a […] Read more »

Important environment variables commonly used in Linux

Variable Description HOME Path to the current user’s home directory. PATH List of directories that the shell searches for executable files. USER Username of the currently logged-in user. SHELL Path to the current user’s default shell. PWD Current working directory. OLDPWD Previous working directory, before the last directory change. LANG […] Read more »

ufw: Uncomplicated Firewall

Description: A user-friendly frontend for managing firewall rules on Linux. ufw is designed to make configuring a firewall easier by providing a straightforward command-line interface. Command to Enable UFW Command to Check UFW Status: Command to Allow Incoming Traffic on Port 8080: Command to Deny Incoming Traffic on Port 3306: […] Read more »

history: Command History Management

history: Display or manipulate the command history list. Description: Shows the list of commands previously executed in the shell. Useful for recalling and reusing commands without retyping them. This will execute the command listed as number 3 in the history list. Output: Command to Execute a Specific History Entry: Output: […] Read more »

fsck: Disk usage and file integrity

fsck: File System Consistency Check and Repair Description: Checks and repairs inconsistencies in file systems. Running fsck is essential for maintaining file system integrity, especially after improper shutdowns or if there are disk errors. Replace /dev/sdX with the specific device or partition you want to check. Output: Using fsck with […] Read more »

Most Common and Important Files and Directories

Here’s a table categorizing common and important files and directories by their group: System and Configuration Files File/Directory Description /etc/passwd Contains user account information, such as usernames and user IDs. /etc/shadow Stores hashed user passwords and password expiration information. /etc/group Contains group account information, including group names and group IDs. […] Read more »

watch: Monitor command output at regular intervals

Command: watch The watch command is used to execute a command repeatedly at specified intervals and display the output. This is useful for monitoring changes in command output or system status in real-time. Commands and Outputs: Output: Output: Output: Changes will be highlighted to show differences from the previous output. […] Read more »