{"id":24206475,"url":"https://github.com/heynzar/bash-and-linux-journey","last_synced_at":"2026-05-06T15:32:59.064Z","repository":{"id":270759019,"uuid":"911365010","full_name":"heynzar/bash-and-linux-journey","owner":"heynzar","description":"⚡ This is a friendly guide for anyone who wants to explore and learn Linux, master command-line tools, and dive into the world of bash scripting.","archived":false,"fork":false,"pushed_at":"2025-01-22T19:53:34.000Z","size":177,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T14:13:12.019Z","etag":null,"topics":["bash","bash-script","command-line","linux","os"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heynzar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-02T21:03:19.000Z","updated_at":"2025-02-21T18:13:04.000Z","dependencies_parsed_at":"2025-01-22T20:38:01.217Z","dependency_job_id":null,"html_url":"https://github.com/heynzar/bash-and-linux-journey","commit_stats":null,"previous_names":["heynzar/bash-practice","heynzar/bash-and-linux-journey"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/heynzar/bash-and-linux-journey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heynzar%2Fbash-and-linux-journey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heynzar%2Fbash-and-linux-journey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heynzar%2Fbash-and-linux-journey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heynzar%2Fbash-and-linux-journey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heynzar","download_url":"https://codeload.github.com/heynzar/bash-and-linux-journey/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heynzar%2Fbash-and-linux-journey/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27315788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-28T02:00:06.623Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bash-script","command-line","linux","os"],"created_at":"2025-01-14T00:33:24.936Z","updated_at":"2025-11-28T16:05:49.972Z","avatar_url":"https://github.com/heynzar.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐧 Bash and Linux Journey\n\nThis project started as my journey to learn Linux and Bash scripting as part of a university module.\n\nAlong the way, I realized how valuable this knowledge could be, so I decided to enhance it and share it with everyone.\n\nThis guide serves as a solid starting point for anyone looking to understand Linux fundamentals and dive into Bash scripting.\n\n---\n\n![Project Cover, Bash and Linux Guide for Beginners](./cover.jpg)\n\n\u003ca id=\"top\"\u003e\u003c/a\u003e\n\n## 📚 Table of Contents\n\n1. [Linux Fundamentals](#1-linux-fundamentals)  \n   1.1. [Basic Commands](#11-basic-commands)  \n   1.2. [File Permissions](#12-file-permissions)  \n   1.3. [Users and Groups](#13-users-and-groups-management)  \n   1.4. [Process Management](#14-process-management)  \n   1.5. [Regular Expressions](#15-regular-expressions)\n2. [Bash Fundamentals](#2-bash-fundamentals)  \n   2.1. [Introduction to Bash Scripts](#21-introduction-to-bash-scripts)  \n   2.2. [Variables](#22-variables)  \n   2.3. [Special Variables](#23-special-variables)  \n   2.4. [Control Flow](#24-control-flow)  \n   2.5. [Numbers and Strings](#25-numbers-and-strings)  \n   2.6. [Loops and Iteration](#26-loops-and-iteration)  \n   2.7. [Functions](#27-functions)\n3. [Linux Fundamentals Test](#3-linux-fundamentals-test)  \n   3.1. [Easy](#31-easy-linux-questions)  \n   3.2. [Medium](#32-medium-linux-questions)  \n   3.3. [Hard](#33-hard-linux-questions)\n4. [Practical Scripts](#4-practical-scripts)\\\n   4.1. [Directory Organizer](#4-practical-scripts)\\\n   4.2. [System information](#4-practical-scripts)  \n   4.3. [Todo List](#4-practical-scripts)\n5. [Acknowledgments](\"#5-acknowledgments\")\n6. [Contact](\"#6-contact\")\n\n---\n\n## 1. **Linux Fundamentals**\n\nLearn the core concepts of Linux, from basic commands to managing processes. Files included:\n\n- [`01_basic_commands.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/01_Linux_Fundamentals/01_basic_commands.md): Overview of essential Linux commands.\n- [`02_file_permissions.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/01_Linux_Fundamentals/02_file_permissions.md): Managing file and directory permissions.\n- [`03_users_and_groups.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/01_Linux_Fundamentals/03_users_and_groups.md): User and group management.\n- [`04_process_management.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/01_Linux_Fundamentals/04_process_management.md): Handling system processes.\n- [`Regular_Expressions.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/01_Linux_Fundamentals/Regular_Expressions.md): Introduction to regular expressions in Linux.\n\n## 1.1 **Basic Commands**\n\nThis is a quick summary of basic Linux commands. For detailed explanations and examples, check the full guide [`01_basic_commands.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/01_Linux_Fundamentals/01_basic_commands.md).\n\n| ID  | Command  | Description                                            |\n| --- | -------- | ------------------------------------------------------ |\n| 1   | `pwd`    | Print current working directory path                   |\n| 2   | `cd`     | Change between directories                             |\n| 3   | `ls`     | List directory contents and their properties           |\n| 4   | `mkdir`  | Create new directories                                 |\n| 5   | `cat`    | Display, combine, and create text files                |\n| 6   | `less`   | View text files with forward and backward navigation   |\n| 7   | `more`   | View text files with forward-only pagination           |\n| 8   | `head`   | Display the beginning of files                         |\n| 9   | `tail`   | Display the end of files                               |\n| 10  | `touch`  | Create empty files or update file timestamps           |\n| 11  | `cp`     | Copy files and directories                             |\n| 12  | `mv`     | Move or rename files and directories                   |\n| 13  | `rm`     | Remove files and directories                           |\n| 14  | `tr`     | Translate or delete characters in text                 |\n| 15  | `wc`     | Count lines, words, and characters in files            |\n| 16  | `ln`     | Create hard or symbolic links between files            |\n| 17  | `locate` | Find files by name using system database               |\n| 18  | `find`   | Search for files and directories with complex criteria |\n| 19  | `grep`   | Search for text patterns in files                      |\n| 20  | `cut`    | Extract sections from lines of files                   |\n| 21  | `awk`    | Pattern scanning and text processing language          |\n| 22  | `sort`   | Sort lines of text files                               |\n| 23  | `uniq`   | Report or omit repeated lines                          |\n| 24  | `diff`   | Compare files line by line                             |\n| 25  | `cmp`    | Compare files byte by byte                             |\n\n## 1.2 **File Permissions**\n\nThis is a quick summary of file permissions in Linux. For detailed explanations and examples, check the full guide [`02_file_permissions.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/01_Linux_Fundamentals/02_file_permissions.md).\n\n| ID  | Command   | Description                                 |\n| --- | --------- | ------------------------------------------- |\n| 1   | `chmod`   | Change permissions of files and directories |\n| 2   | `chown`   | Change the owner of files and directories   |\n| 3   | `chgrp`   | Change the group of files and directories   |\n| 4   | `umask`   | Control default permission settings         |\n| 5   | `getfacl` | Display Access Control Lists (ACLs)         |\n| 6   | `setfacl` | Modify Access Control Lists (ACLs)          |\n\n## 1.3 **Users and Groups Management**\n\nThis is a quick summary of users and groups management in Linux. For detailed explanations and examples, check the full guide [`03_users_and_groups.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/01_Linux_Fundamentals/03_users_and_groups.md).\n\n| ID  | Command    | Description                             |\n| --- | ---------- | --------------------------------------- |\n| 1   | `useradd`  | Create new users in the system          |\n| 2   | `usermod`  | Modify existing user accounts           |\n| 3   | `userdel`  | Delete users from the system            |\n| 4   | `passwd`   | Manage user passwords                   |\n| 5   | `groupadd` | Create new groups                       |\n| 6   | `groupmod` | Modify existing groups                  |\n| 7   | `groupdel` | Delete groups from the system           |\n| 8   | `gpasswd`  | Manage group members and administrators |\n| 9   | `id`       | Show user and group IDs                 |\n| 10  | `groups`   | Display group membership                |\n| 11  | `who`      | Show logged-in users                    |\n| 12  | `w`        | Detailed view of logged-in users        |\n\n## 1.4 **Process Management**\n\nThis is a quick summary of process management in Linux. For detailed explanations and examples, check the full guide [`04_process_management.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/01_Linux_Fundamentals/04_process_management.md).\n\n| ID  | Command       | Description                                 |\n| --- | ------------- | ------------------------------------------- |\n| 1   | `ps`          | Display information about running processes |\n| 2   | `top`         | Real-time view of system processes          |\n| 3   | `kill`        | Send signals to processes                   |\n| 4   | `nice/renice` | Manage process priority                     |\n| 5   | `jobs/bg/fg`  | Manage background and foreground jobs       |\n| 6   | `crontab`     | Schedule and manage automated tasks         |\n| 7   | `htop`        | Enhanced interactive process viewer         |\n| 8   | `free`        | Display memory usage                        |\n| 9   | `uptime`      | Show system load and uptime                 |\n\n## 1.5 **Regular Expressions**\n\nThis is a quick summary of regular expressions in Bash. For detailed explanations and examples, check the full guide [`Regular_Expressions.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/01_Linux_Fundamentals/Regular_Expressions.md).\n\n| ID  | Pattern | Description                                                |\n| --- | ------- | ---------------------------------------------------------- |\n| 1   | `.`     | Matches any single character                               |\n| 2   | `[]`    | Matches any character within the brackets                  |\n| 3   | `[^]`   | Matches any character not within the brackets              |\n| 4   | `-`     | Defines a range of characters within brackets              |\n| 5   | `*`     | Matches zero or more occurrences of the previous character |\n| 6   | `+`     | Matches one or more occurrences of the previous character  |\n| 7   | `?`     | Matches zero or one occurrence of the previous character   |\n| 8   | `^`     | Matches the start of a line                                |\n| 9   | `$`     | Matches the end of a line                                  |\n| 10  | `{}`    | Specifies exact number of occurrences                      |\n| 11  | `\\`     | Escapes special characters                                 |\n| 12  | `()`    | Groups patterns together                                   |\n| 13  | `\\|`    | Alternation (OR operator)                                  |\n| 14  | `\\b`    | Word boundary                                              |\n| 15  | `\\d`    | Matches any digit (equivalent to [0-9])                    |\n| 16  | `\\w`    | Matches any word character (equivalent to [a-zA-Z0-9_])    |\n| 17  | `\\s`    | Matches any whitespace character                           |\n\n---\n\n## 2. **Bash Fundamentals**\n\nA step-by-step guide to Bash scripting, covering everything from the basics to advanced concepts. Files included:\n\n- [`01_Introduction_Bash_Scripts.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/01_Introduction_Bash_Scripts.md): Getting started with Bash scripts.\n- [`02_Variables.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/02_Variables.md): Understanding variables in Bash.\n- [`03_Special_variables.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/03_Special_variables.md): Overview of special variables.\n- [`04_Control_Flow.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/04_Control_Flow.md): Conditional statements and control flow.\n- [`05_Numbers_and_Strings.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/05_Numbers_and_Strings.md): Working with numbers and strings.\n- [`06_Loops_and_Iteration.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/06_Loops_and_Iteration.md): Looping constructs in Bash.\n- [`07_Functions.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/07_Functions.md): Creating and using functions in Bash.\n\n## 2.1 Introduction To Bash Scripts\n\n**Core Concepts**\n\nA Bash script is a text file containing a sequence of shell commands for automated execution. Think of it as a recipe for your computer to follow.\n\n**Essential Components**\n\n1. **Shebang Line**\n\n   - Every script starts with `#!/bin/bash`\n   - Must be the first line of the file\n\n2. **Basic Script Creation Process**\n   ```bash\n   nano script_name.sh    # Create/edit script\n   chmod +x script_name.sh # Make executable\n   ./script_name.sh       # Run script\n   ```\n\n**Best Practices**\n\n- Include clear comments explaining the script's purpose\n- Use descriptive filenames (e.g., `backup_photos.sh` instead of `script1.sh`)\n- Avoid spaces around equal signs in assignments (`name=\"John\"`, not `name = \"John\"`)\n\n**Script Structure Example**\n\n```bash\n#!/bin/bash\n\n# Script purpose\n# Author\n# Date\n\n# Main commands\ncommand1\ncommand2\n\n# End of script notification\n```\n\nFor detailed examples and practices, explore the full guide [`01_Introduction_Bash_Scripts.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/01_Introduction_Bash_Scripts.md).\n\n## 2.2 Variables\n\nVariables are placeholders for storing data in Bash scripts.\n\n**Key takeaways:**\n\n- Assign values with `=` (no spaces).\n- Use meaningful names (e.g., `user_name` not `a`).\n- Access values with `$`, like `$name`.\n\n**Types include:**\n\n- **Shell Variables:** Script-local variables.\n- **Environment Variables:** System-wide variables like `$HOME` and `$USER`.\n\nTo capture user input, use `read`, optionally with prompts or timeouts. Combine these with command substitution to store output from commands like `date`.\n\nFor detailed examples and practices, explore the full guide [`02_Variables.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/02_Variables.md).\n\n## 2.3 Special Variables\n\n**Special Variables Overview**\n\nKey shell variables and their purposes:\n\n- `$0` - Script name\n- `$1` to `$9` - Script arguments (positional parameters)\n- `$#` - Number of arguments\n- `$*` and `$@` - All arguments\n- `$?` - Last command's exit status\n- `$$` - Current process ID\n- `$!` - Last background process ID\n\n**Parameter Handling**\n\n```bash\n#!/bin/bash\nname=${1:-\"Default\"}    # Default value if parameter is unset\nlength=${#1}            # Parameter length\nsubstring=${1:0:3}      # Extract substring\n```\n\n**Best Practices**\n\n- Quote variables when using them: `\"$variable\"`\n- Check required arguments:\n\n```bash\nif [ $# -lt 2 ]; then\n    echo \"Usage: $0 arg1 arg2\"\n    exit 1\nfi\n```\n\n- Use meaningful variable names\n- Provide default values for optional parameters\n\nFor detailed examples and practices, explore the full guide [`03_Special_variables.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/03_Special_variables.md).\n\n## 2.4 Control Flow\n\n### 1. If Statements\n\n```bash\nif [ condition ]; then\n    # code\nelif [ condition ]; then\n    # code\nelse\n    # code\nfi\n```\n\n### 2. Case Statements\n\n```bash\ncase $variable in\n    pattern1) commands ;;\n    pattern2) commands ;;\n    *) default commands ;;\nesac\n```\n\n### Condition Types\n\n1. **Numeric Comparisons**\n\n   - `-eq` - Equal to\n   - `-ne` - Not equal\n   - `-gt` - Greater than\n   - `-lt` - Less than\n   - `-ge` - Greater than or equal\n   - `-le` - Less than or equal\n\n2. **String Tests**\n\n   - `=` - Equal to\n   - `!=` - Not equal to\n   - `-z` - Empty string\n   - `-n` - Non-empty string\n\n3. **File Tests**\n   - `-e` - Exists\n   - `-f` - Regular file\n   - `-d` - Directory\n   - `-r` - Readable\n   - `-w` - Writable\n   - `-x` - Executable\n\nFor detailed examples and practices, explore the full guide [`04_Control_Flow.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/04_Control_Flow.md).\n\n## 2.5 Numbers and Strings\n\n### Arithmetic Operations\n\n1. **Using let**\n\n```bash\nlet sum=5+3\nlet product=4*3\n```\n\n1. **Using expr**\n\n```bash\nresult=$(expr 10 + 5)\nproduct=$(expr 5 \\* 3)\n```\n\n1. **Double Parentheses**\n\n```bash\nsum=$((5 + 3))\npower=$((2 ** 3))  # Exponentiation\n```\n\n### String Operations\n\n**Basic String Manipulation**\n\n- Length: `${#string}`\n- Concatenation: `full_name=\"$first $last\"`\n- Substring: `${string:start:length}`\n- Uppercase: `${string^^}`\n- Lowercase: `${string,,}`\n\nFor detailed examples and practices, explore the full guide [`05_Numbers_and_Strings.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/05_Numbers_and_Strings.md).\n\n## 2.6 Loops and Iteration\n\n### Loop Types\n\n**1. For Loops**\n\n```bash\n# Basic syntax\nfor i in 1 2 3 4 5; do\n    echo \"$i\"\ndone\n\n# Range syntax\nfor i in {1..5}; do\n    echo \"$i\"\ndone\n\n# C-style syntax\nfor ((i=1; i\u003c=5; i++)); do\n    echo \"$i\"\ndone\n```\n\n**2. While Loops**\n\n```bash\n# Basic while\ncounter=1\nwhile [ $counter -le 5 ]; do\n    ((counter++))\ndone\n\n# Reading files\nwhile read -r line; do\n    echo \"$line\"\ndone \u003c file.txt\n```\n\n### Control Statements\n\n- `break` - Exit the loop\n- `continue` - Skip to next iteration\n\nFor detailed examples and practices, explore the full guide [`06_Loops_and_Iteration.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/06_Loops_and_Iteration.md).\n\n## 2.7 Functions\n\n### 1. Basic Function Structure\n\n- Define a function using:\n  ```bash\n  function_name() {\n      # Function code\n  }\n  ```\n- Call the function by its name.\n\n### 2. Functions with Parameters\n\n- Access parameters using `$1`, `$2`, etc.\n- Use `$@` to loop through all parameters.\n\n### 3. Return Values\n\n- Use `return` for exit codes (success: `0`, failure: non-zero).\n- Use `echo` to output values for further processing.\n\n### 4. Local Variables\n\n- Use `local` keyword to restrict variable scope within functions.\n\nFor detailed examples and practices, explore the full guide [`07_Functions.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/02_Bash_Fundamentals/07_Functions.md).\n\n---\n\n## 3. **Linux Fundamentals Test**\n\nTest your understanding of Linux basics with three levels of challenges:\n\n- [`01_Easy.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/03_Linux_Fundamentals_Test/01_Easy.md): Simple tasks to build confidence.\n- [`02_Medium.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/03_Linux_Fundamentals_Test/02_Medium.md): Intermediate challenges to test your skills.\n- [`03_Hard.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/03_Linux_Fundamentals_Test/03_Hard.md): Advanced problems, if you conquer these, you're ready for anything!\n\n## 3.1 Easy Linux Questions\n\n**01 Basic Commands**\n\n1. What is the command to display the current working directory?\n2. How do you list all files and directories, including hidden ones?\n3. Which command is used to create a new directory?\n4. How do you display the content of a text file?\n5. What command is used to move or rename a file?\n\n**02 File Permissions**\n\n6. How do you check the permissions of a file or directory?\n7. What does the permission `rwxr-xr--` mean?\n8. Which command is used to change the ownership of a file?\n9. How do you change file permissions using symbolic notation (e.g., add write permission to the owner)?\n10. What is the numeric value of `rw-r--r--` in octal notation?\n\n**03 Users and Groups**\n\n11. Which command is used to display information about the currently logged-in user?\n12. How do you switch to a different user account?\n13. What command is used to add a new user to the system?\n14. How can you check the groups a user belongs to?\n15. Which file contains the list of all users on a system?\n\n**04 Process Management**\n\n16. What command is used to display a list of running processes?\n17. How do you terminate a process using its PID?\n18. Which command shows the real-time CPU and memory usage of processes?\n19. How do you run a command in the background?\n20. What is the command to bring a background process to the foreground?\n\nI've organized the answers in this file [`01_Easy.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/03_Linux_Fundamentals_Test/01_Easy.md).\n\n## 3.2 Medium Linux Questions\n\n**01 Basic Commands**\n\n1. How do you navigate to the root directory from the current working directory?\n2. What is the difference between `ls` and `ls -l`?\n3. How do you create a new file without using a text editor?\n4. Which command is used to view the first 10 lines of a file, and how do you change the number of lines displayed?\n5. What is the difference between `more` and `less` commands?\n6. How do you display all files in a directory, including hidden ones, sorted by modification time?\n7. How do you copy multiple files to a directory?\n8. Which command allows you to replace all occurrences of a character in a file with another character?\n9. How can you count the number of lines, words, and characters in a file?\n10. How do you find the location of a command’s executable file?\n11. Which command helps you find files by name in the current directory and its subdirectories?\n12. What is the difference between `grep` and `find` commands?\n13. How do you display only unique lines from a file?\n14. What command can you use to compare two files and highlight the differences?\n15. How do you sort the lines of a file in reverse order?\n16. Which command allows you to display specific columns from a file?\n17. How can you combine the output of two files line by line?\n18. What is the purpose of the `ln` command, and how do you create a symbolic link?\n19. How do you permanently delete a directory and all its contents?\n20. How can you search for a specific pattern in all `.txt` files within a directory?\n\n**02 File Permissions**\n\n21. How do you recursively change permissions for all files in a directory?\n22. What does the sticky bit do, and how do you set it on a directory?\n23. How can you set default permissions for newly created files using `umask`?\n24. What command is used to change both the owner and group of a file at once?\n25. How do you remove execute permission for the group and others from a directory?\n\n**03 Users and Groups**\n\n26. What is the difference between `useradd` and `adduser` commands?\n27. How do you delete a user along with their home directory?\n28. Which command is used to lock a user account?\n29. How can you change the primary group of a user?\n30. What is the purpose of the `/etc/group` file?\n\n**04 Process Management**\n\n31. How do you display the parent process ID (PPID) of a process?\n32. Which command is used to schedule a job to run at a specific time?\n33. What is the difference between `kill` and `killall` commands?\n34. How do you identify and kill processes consuming the most CPU resources?\n35. How can you view the environmental variables of a specific process?\n\nI've organized the answers in this file [`02_Medium.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/03_Linux_Fundamentals_Test/02_Medium.md).\n\n## 3.3 Hard Linux Questions\n\n**01 Basic Commands**\n\n1. How do you navigate to a directory with spaces in its name?\n2. What command would you use to count the number of files and directories within a specific directory?\n3. How can you view the last 15 lines of a file and keep monitoring it for new lines?\n4. Which command allows you to replace a specific string in a file with another string and save the changes?\n5. How can you list all files in a directory and its subdirectories, along with their sizes?\n6. What is the difference between a hard link and a symbolic link, and how do you create each?\n7. How do you find and delete all `.log` files within a directory and its subdirectories?\n8. How can you sort the contents of a file numerically and remove duplicate lines?\n9. What command can you use to display the 5 most frequently occurring words in a file?\n10. How do you find the total size of all `.txt` files within the current directory?\n\n**02 File Permissions**\n\n11. How do you set permissions so that only the owner can read, write, and execute a file, while the group and others have no permissions?\n12. What command is used to find all files owned by a specific user?\n13. How do you ensure that new files created in a directory inherit the group ownership of the directory?\n14. How can you change the permissions of a file to match those of another file?\n15. Which command allows you to find files with the SUID bit set?\n\n**03 Users and Groups**\n\n16. How do you list all users currently logged into the system?\n17. What command would you use to check the last login time of a user?\n18. How can you add a user to multiple groups at once?\n19. How do you change the password expiration policy for a specific user?\n20. What is the purpose of the `/etc/shadow` file, and who has access to it?\n\n**04 Process Management**\n\n21. How can you run a command that continues to execute even after you log out?\n22. How do you monitor the number of processes run by a specific user?\n23. Which command allows you to send a specific signal (e.g., `SIGTERM`) to a process by name?\n24. How do you schedule a recurring job to run every day at 2 AM?\n25. What is the difference between `nice` and `renice` commands?\n\nI've organized the answers in this file [`03_Hard.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/03_Linux_Fundamentals_Test/03_Hard.md).\n\n---\n\n## 4. **Practical Scripts**\n\nSome real-world examples of Bash scripts to reinforce learning and showcase practical use cases. Check those files, or run the scripts on your machine to see how they work.\n\n- [`directory_organizer.sh`](https://github.com/heynzar/bash-and-linux-journey/blob/main/04_Practical_Scripts/directory_organizer.sh): Automatically organize files into directories based on their type.\n- [`system_info.sh.md`](https://github.com/heynzar/bash-and-linux-journey/blob/main/04_Practical_Scripts/system_info.sh): Display detailed system statistics at a glance.\n- [`todo.sh`](https://github.com/heynzar/bash-and-linux-journey/blob/main/04_Practical_Scripts/todo.sh): A simple script to manage your tasks from the terminal.\n\n## 5. Acknowledgments\n\nSpecial thanks to these YouTube channels for their exceptional knowledge and tutorials on Linux and Bash:\n\n- [Learn Linux TV](https://www.youtube.com/@LearnLinuxTV)\n- [Network Chuck](https://www.youtube.com/@NetworkChuck)\n\nTheir content has been invaluable in the creation of this guide.\n\n## 6. Contact\n\nNzar - [@heynzar](https://x.com/heynzar) - heynzar@gmail.com\n\nProject Link: [https://github.com/heynzar/bash-and-linux-journey](https://github.com/heynzar/bash-and-linux-journey)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheynzar%2Fbash-and-linux-journey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheynzar%2Fbash-and-linux-journey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheynzar%2Fbash-and-linux-journey/lists"}