which: Locate executable
August 12th, 2024 10:44 AM Mr. Q Categories: Command
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
August 12th, 2024 10:41 AM Mr. Q Categories: Command
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
August 12th, 2024 10:28 AM Mr. Q Categories: Command, Learning
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
August 12th, 2024 10:26 AM Mr. Q Categories: Command
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
August 12th, 2024 10:14 AM Mr. Q Categories: Command
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
August 9th, 2024 2:32 PM Mr. Q Categories: Command
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
August 9th, 2024 2:27 PM Mr. Q Categories: Command
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
August 9th, 2024 2:22 PM Mr. Q Categories: Command
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
August 9th, 2024 2:03 PM Mr. Q Categories: Command
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
August 9th, 2024 2:00 PM Mr. Q Categories: Command
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 »