Updates to the Linux Roadmap (#7149)

* add Practice Linux Commands with Hands-on Labs

* Update public/roadmap-content/devops.json

Co-authored-by: Arik Chakma <arikchangma@gmail.com>

* Update public/roadmap-content/devops.json

* add linux free tutorials

---------

Co-authored-by: huhuhang <huhuhang@github.com>
Co-authored-by: dsh <daniel.s.holdsworth@gmail.com>
Co-authored-by: Arik Chakma <arikchangma@gmail.com>
Co-authored-by: huhuhang <no-reply@huhuhang.com>
pull/7081/head^2
Hang 2 months ago committed by GitHub
parent 024c7cbda1
commit 84184724c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      src/data/roadmaps/linux/content/100-navigation-basics/100-basic-commands.md
  2. 8
      src/data/roadmaps/linux/content/100-navigation-basics/101-moving-files.md
  3. 7
      src/data/roadmaps/linux/content/100-navigation-basics/102-creating-files.md
  4. 6
      src/data/roadmaps/linux/content/100-navigation-basics/103-directory-hierarchy.md
  5. 6
      src/data/roadmaps/linux/content/100-navigation-basics/index.md
  6. 4
      src/data/roadmaps/linux/content/101-editing-files/100-vim.md
  7. 10
      src/data/roadmaps/linux/content/101-editing-files/101-nano.md
  8. 3
      src/data/roadmaps/linux/content/102-shell-basics/100-command-path.md
  9. 8
      src/data/roadmaps/linux/content/102-shell-basics/101-environment-variables.md
  10. 1
      src/data/roadmaps/linux/content/102-shell-basics/102-command-help.md
  11. 4
      src/data/roadmaps/linux/content/102-shell-basics/103-redirects.md
  12. 7
      src/data/roadmaps/linux/content/103-working-with-files/100-permissions.md
  13. 7
      src/data/roadmaps/linux/content/103-working-with-files/101-archiving.md
  14. 9
      src/data/roadmaps/linux/content/103-working-with-files/102-copying-renaming.md
  15. 6
      src/data/roadmaps/linux/content/103-working-with-files/103-soft-hard-links.md
  16. 17
      src/data/roadmaps/linux/content/103-working-with-files/index.md
  17. 10
      src/data/roadmaps/linux/content/104-text-processing/101-cut.md
  18. 8
      src/data/roadmaps/linux/content/104-text-processing/103-sort.md
  19. 8
      src/data/roadmaps/linux/content/104-text-processing/104-tr.md
  20. 9
      src/data/roadmaps/linux/content/104-text-processing/105-head.md
  21. 8
      src/data/roadmaps/linux/content/104-text-processing/106-tail.md
  22. 6
      src/data/roadmaps/linux/content/104-text-processing/107-join.md
  23. 8
      src/data/roadmaps/linux/content/104-text-processing/111-nl.md
  24. 6
      src/data/roadmaps/linux/content/104-text-processing/112-wc.md
  25. 8
      src/data/roadmaps/linux/content/104-text-processing/115-uniq.md
  26. 1
      src/data/roadmaps/linux/content/104-text-processing/116-grep.md
  27. 1
      src/data/roadmaps/linux/content/104-text-processing/117-awk.md
  28. 8
      src/data/roadmaps/linux/content/107-user-management/index.md
  29. 8
      src/data/roadmaps/linux/content/109-package-management/index.md

@ -1,8 +1,7 @@
# Linux Navigation Basics: Basic Commands # Linux Navigation Basics: Basic Commands
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. 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.
```bash ```bash
# Change directory # Change directory
cd /path/to/directory cd /path/to/directory
@ -17,4 +16,8 @@ pwd
man ls man ls
``` ```
In this brief introduction, we will discuss and explore these basic commands and how they aid us in navigation around the Linux environment. In this brief introduction, we will discuss and explore these basic commands and how they aid us in navigation around the Linux environment.
Learn more from the following resources:
- [@article@Linux pwd Command: Directory Displaying](https://labex.io/tutorials/linux-file-and-directory-operations-17997)

@ -1,4 +1,4 @@
# Moving Files # Moving Files
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. 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.
@ -8,6 +8,10 @@ The general syntax for the `mv` command is as follows:
mv [options] source destination mv [options] source destination
``` ```
Here, `source` denotes the file or directory that you want to move while `destination` denotes the location where you want to move your source file or directory. Here, `source` denotes the file or directory that you want to move while `destination` denotes the location where you want to move your source file or directory.
The `mv` command is widely used because of its simplicity and versatility. Whether you want to organize your files by moving them into different directories or rename a bunch of files, the `mv` command is your go-to tool in Linux. The `mv` command is widely used because of its simplicity and versatility. Whether you want to organize your files by moving them into different directories or rename a bunch of files, the `mv` command is your go-to tool in Linux.
Learn more from the following resources:
- [@article@Linux mv Command: File Moving and Renaming](https://labex.io/tutorials/linux-linux-mv-command-file-moving-and-renaming-209743)

@ -29,7 +29,12 @@ rm example.txt
# Ask for confirmation # Ask for confirmation
rm -i [filename] rm -i [filename]
``` ```
```bash ```bash
# Removes an empty directory # Removes an empty directory
rmdir [directory] rmdir [directory]
``` ```
Learn more from the following resources:
- [@article@Linux rm Command: File Removing](https://labex.io/tutorials/linux-linux-rm-command-file-removing-209741)

@ -1,6 +1,6 @@
# Understanding Directory Hierarchy # Understanding Directory Hierarchy
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. 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. - `/`: Root directory, the top level of the file system.
- `/home`: User home directories. - `/home`: User home directories.
@ -14,4 +14,4 @@ In Linux, understanding the directory hierarchy is crucial for efficient navigat
Visit the following resources to learn more: Visit the following resources to learn more:
- [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). - [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).

@ -1,4 +1,4 @@
# Navigation Basics # Navigation Basics
In Linux, navigation between directories and files is a fundamental, yet essential function that allows you to exploit the power of the command-line interface (CLI). Mastering the basic Linux navigation commands such as `cd`, `pwd`, `ls`, and `tree` enables you to flawlessly move from one point to another within the filesystem, display the list of files & directories, and understand your position relative to other system components. In Linux, navigation between directories and files is a fundamental, yet essential function that allows you to exploit the power of the command-line interface (CLI). Mastering the basic Linux navigation commands such as `cd`, `pwd`, `ls`, and `tree` enables you to flawlessly move from one point to another within the filesystem, display the list of files & directories, and understand your position relative to other system components.
@ -15,8 +15,10 @@ cd /path/to/directory
```bash ```bash
ls ls
``` ```
Visit the following resources to learn more: Visit the following resources to learn more:
- [@article@Intro to Linux](https://www.linkedin.com/pulse/intro-linux-fundamentals-what-hillary-nyakundi-4u7af/) - [@article@Intro to Linux](https://www.linkedin.com/pulse/intro-linux-fundamentals-what-hillary-nyakundi-4u7af/)
- [@video@Linux fundamentals](https://www.youtube.com/watch?v=kPylihJRG70&t=1381s&ab_channel=TryHackMe) - [@video@Linux fundamentals](https://www.youtube.com/watch?v=kPylihJRG70&t=1381s&ab_channel=TryHackMe)
- [@article@Practice on Linux fundamentals]( https://linuxjourney.com/) - [@article@Practice on Linux fundamentals](https://linuxjourney.com/)
- [@course@Linux for Noobs (Hands-on)](https://labex.io/courses/linux-for-noobs)

@ -1,7 +1,7 @@
# Vim: An Essential Tool for Editing Files # Vim: An Essential Tool for Editing Files
Vim (Vi Improved) is a powerful and flexible text editor used in Unix-like systems. It builds on the original Vi editor with additional features and improvements, including multi-level undo, syntax highlighting, and an extensive set of commands for text manipulation. Vim (Vi Improved) is a powerful and flexible text editor used in Unix-like systems. It builds on the original Vi editor with additional features and improvements, including multi-level undo, syntax highlighting, and an extensive set of commands for text manipulation.
<br>
Vim operates primarily in three modes: Vim operates primarily in three modes:
- Normal (for navigation and manipulation). - Normal (for navigation and manipulation).
@ -17,7 +17,7 @@ vim example.txt
To insert new content, press 'i' for 'insert mode'. After editing, press 'ESC' to go back to 'command mode', and type ':wq' to save and quit. To insert new content, press 'i' for 'insert mode'. After editing, press 'ESC' to go back to 'command mode', and type ':wq' to save and quit.
To learn more, visit this: To learn more, visit this:
<br>
Check out this [Github repo](https://github.com/iggredible/Learn-Vim?tab=readme-ov-file) on Vim from basic to advanced. Check out this [Github repo](https://github.com/iggredible/Learn-Vim?tab=readme-ov-file) on Vim from basic to advanced.
- [@article@Learn Vim Progressively](https://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/) - [@article@Learn Vim Progressively](https://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/)

@ -1,4 +1,4 @@
# Nano: A File Editing Tool # Nano: A File Editing Tool
Nano is a popular, user-friendly text editor used for creating and editing files directly within the Linux command line interface (CLI). It is an alternative to editors like `Vi` and `Emacs` and is considered more straightforward for beginners due to its simple and intuitive interface. Nano is a popular, user-friendly text editor used for creating and editing files directly within the Linux command line interface (CLI). It is an alternative to editors like `Vi` and `Emacs` and is considered more straightforward for beginners due to its simple and intuitive interface.
@ -8,18 +8,20 @@ Nano comes pre-installed with many Linux distributions but if it's not installed
# Ubuntu based distributions # Ubuntu based distributions
sudo apt update sudo apt update
sudo apt install nano sudo apt install nano
``` ```
```bash ```bash
# Arch Linux # Arch Linux
sudo pacman -S nano sudo pacman -S nano
``` ```
To use Nano to edit or create files in Linux, the following command can be used: To use Nano to edit or create files in Linux, the following command can be used:
```bash ```bash
nano filename nano filename
``` ```
Visit the following resources to learn more:
Visit the following resources to learn more:
- [@article@Blog on nano](https://ioflood.com/blog/nano-linux-command/) - [@article@Blog on nano](https://ioflood.com/blog/nano-linux-command/)
- [@video@Nano editor fundamentals](https://www.youtube.com/watch?v=gyKiDczLIZ4&ab_channel=HackerSploit) - [@video@Nano editor fundamentals](https://www.youtube.com/watch?v=gyKiDczLIZ4&ab_channel=HackerSploit)

@ -2,11 +2,12 @@
In Linux, the command path is an important concept under shell basics. Simply put, command path is a variable that is used by the shell to determine where to look for the executable files to run. Linux commands are nothing but programs residing in particular directories. But, one does not have to navigate to these directories every time to run these programs. The command path comes to the rescue! In Linux, the command path is an important concept under shell basics. Simply put, command path is a variable that is used by the shell to determine where to look for the executable files to run. Linux commands are nothing but programs residing in particular directories. But, one does not have to navigate to these directories every time to run these programs. The command path comes to the rescue!
Usually, when you type a command in the terminal, the shell needs to know the absolute path of the command's executable to run it. Instead of typing the full path each time, command paths allow the shell to automatically search the indicated directories in the correct order. These paths are stored in the $PATH environment variable. Usually, when you type a command in the terminal, the shell needs to know the absolute path of the command's executable to run it. Instead of typing the full path each time, command paths allow the shell to automatically search the indicated directories in the correct order. These paths are stored in the $PATH environment variable.
```sh ```sh
echo $PATH echo $PATH
``` ```
Running this command in a Linux terminal will return all the directories that the shell will search, in order, to find the command it has to run. The directories are separated by a colon. Running this command in a Linux terminal will return all the directories that the shell will search, in order, to find the command it has to run. The directories are separated by a colon.
This feature makes using Linux command-line interface convenient and efficient. This feature makes using Linux command-line interface convenient and efficient.

@ -1,6 +1,6 @@
# Environment Variables Under Shell Basics # Environment Variables Under Shell Basics
In Linux, environment variables are dynamic named values that can affect the behavior of running processes in a shell. They exist in every shell session. A shell session's environment includes, but is not limited to, the user's home directory, command search path, terminal type, and program preferences. In Linux, environment variables are dynamic named values that can affect the behavior of running processes in a shell. They exist in every shell session. A shell session's environment includes, but is not limited to, the user's home directory, command search path, terminal type, and program preferences.
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. 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.
@ -16,4 +16,8 @@ $ env
$ echo $PATH $ echo $PATH
``` ```
Remember, every shell, such as Bourne shell, C shell, or Korn shell in Unix or Linux has different syntax and semantics to define and use environment variables. Remember, every shell, such as Bourne shell, C shell, or Korn shell in Unix or Linux has different syntax and semantics to define and use environment variables.
Learn more from the following resources:
- [@article@Environment Variables in Linux](https://labex.io/tutorials/linux-environment-variables-in-linux-385274)

@ -24,3 +24,4 @@ Learn more from the following resources:
- [@article@How to use the man page](https://www.baeldung.com/linux/man-command) - [@article@How to use the man page](https://www.baeldung.com/linux/man-command)
- [@opensource@tldr-pages/tldr](https://github.com/tldr-pages/tldr) - [@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)

@ -15,3 +15,7 @@ ls -al > file_list.txt
``` ```
This command will write the output of 'ls -al' into 'file_list.txt', whether or not the file initially existed. It will be created if necessary, and if it already exists – it will be overwritten. This command will write the output of 'ls -al' into 'file_list.txt', whether or not the file initially existed. It will be created if necessary, and if it already exists – it will be overwritten.
Learn more from the following resources:
- [@article@Logical Commands and Redirection](https://labex.io/tutorials/linux-logical-commands-and-redirection-387332)

@ -2,7 +2,7 @@
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 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. 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: Let's have a look at an example:
@ -10,7 +10,7 @@ Let's have a look at an example:
-rwxr--r-- 1 root root 4096 Jan 1 12:00 filename -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. 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 `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.
@ -19,4 +19,5 @@ The permissions can be changed using the `chmod`, `chown`, and `chgrp` commands.
Learn more from the following resources: Learn more from the following resources:
- [@article@Linux File Permissions](https://linuxhandbook.com/linux-file-permissions/) - [@article@Linux File Permissions](https://linuxhandbook.com/linux-file-permissions/)
- [@video@Linux File Permissions in 5 Minutes](https://www.youtube.com/watch?v=LnKoncbQBsM) - [@video@Linux File Permissions in 5 Minutes](https://www.youtube.com/watch?v=LnKoncbQBsM)
- [@article@Linux Permissions of Files](https://labex.io/tutorials/linux-permissions-of-files-270252)

@ -1,6 +1,6 @@
# Archiving # Archiving
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`. 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. 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.
@ -19,4 +19,9 @@ tar cvzf archive_name.tar.gz directory_to_archive/
#To create a bzip2 compressed tar archive: #To create a bzip2 compressed tar archive:
tar cvjf archive_name.tar.bz2 directory_to_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. 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.
Learn more from the following resources:
- [@article@Linux File Packaging and Compression](https://labex.io/tutorials/linux-file-packaging-and-compression-385413)

@ -1,4 +1,4 @@
# Copying and Renaming Files # Copying and Renaming Files
In Linux, working with files is a daily operation. Whether you are a system administrator, a developer or a regular user, there are tasks where you need to copy, rename, or perform similar actions with files and directories. In Linux, working with files is a daily operation. Whether you are a system administrator, a developer or a regular user, there are tasks where you need to copy, rename, or perform similar actions with files and directories.
@ -14,4 +14,9 @@ On the other hand, to rename or move files, we use the `mv` command. The `mv` co
mv /path/to/original/file /path/to/new/file mv /path/to/original/file /path/to/new/file
``` ```
Remember that Linux commands are case sensitive so make sure to enter the commands exactly as they are. Remember that Linux commands are case sensitive so make sure to enter the commands exactly as they are.
Learn more from the following resources:
- [@article@Linux cp Command: File Copying](https://labex.io/tutorials/linux-linux-cp-command-file-copying-209744)
- [@article@Linux mv Command: File Moving and Renaming](https://labex.io/tutorials/linux-linux-mv-command-file-moving-and-renaming-209743)

@ -1,8 +1,8 @@
# Soft and Hard Links # Soft and Hard Links
In Unix-like operating systems like Linux, soft (symbolic) and hard links are simply references to existing files that allow users to create shortcuts and duplication effects within their file system. In Unix-like operating systems like Linux, soft (symbolic) and hard links are simply references to existing files that allow users to create shortcuts and duplication effects within their file system.
A hard link is a mirror reflection of the original file, sharing the same file data and inode number, but displaying a different name. It's vital to note that if the original file is deleted, the hard link still retains the file data. A hard link is a mirror reflection of the original file, sharing the same file data and inode number, but displaying a different name. It's vital to note that if the original file is deleted, the hard link still retains the file data.
On the other hand, a soft link, also known as a symbolic link, is more like a shortcut to the original file. It has a different inode number and the file data resides only in the original file. If the original file is removed, the symbolic link breaks and will not work until the original file is restored. On the other hand, a soft link, also known as a symbolic link, is more like a shortcut to the original file. It has a different inode number and the file data resides only in the original file. If the original file is removed, the symbolic link breaks and will not work until the original file is restored.

@ -1,15 +1,22 @@
# Working with Files # 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. 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. 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.
For instance, to create a file named "example.txt", we use the command: For instance, to create a file named "example.txt", we use the command:
```bash ```bash
touch example.txt touch example.txt
``` ```
To list files in the current directory, we use the command: To list files in the current directory, we use the command:
```bash ```bash
ls ls
``` ```
Knowing how to effectively manage and manipulate files in Linux is crucial for administering and running a successful Linux machine.
Knowing how to effectively manage and manipulate files in Linux is crucial for administering and running a successful Linux machine.
Learn more from the following resources:
- [@article@Linux Basic Files Operations](https://labex.io/tutorials/linux-basic-files-operations-270248)

@ -1,4 +1,4 @@
# Cut Command # Cut Command
The `cut` command is a text processing utility that allows you to cut out sections of each line from a file or output, and display it on the standard output (usually, the terminal). It's commonly used in scripts and pipelines, especially for file operations and text manipulation. The `cut` command is a text processing utility that allows you to cut out sections of each line from a file or output, and display it on the standard output (usually, the terminal). It's commonly used in scripts and pipelines, especially for file operations and text manipulation.
@ -12,8 +12,12 @@ cut OPTION... [FILE]...
Here's an example of how you might use the `cut` command in Linux: Here's an example of how you might use the `cut` command in Linux:
```bash ```bash
echo "one,two,three,four" | cut -d "," -f 2 echo "one,two,three,four" | cut -d "," -f 2
``` ```
This command will output the second field (`two`) by using the comma as a field delimiter (`-d ","`). This command will output the second field (`two`) by using the comma as a field delimiter (`-d ","`).
Learn more from the following resources:
- [@article@Linux cut Command: Text Cutting](https://labex.io/tutorials/linux-linux-cut-command-text-cutting-219187)

@ -1,4 +1,4 @@
# Sort # Sort
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). 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).
@ -14,4 +14,8 @@ This command prints the sorted content of the filename.txt file. The original fi
sort filename.txt > sorted_filename.txt sort filename.txt > sorted_filename.txt
``` ```
This command sorts the content of filename.txt and redirects the sorted content into sorted_filename.txt. This command sorts the content of filename.txt and redirects the sorted content into sorted_filename.txt.
Learn more from the following resources:
- [@article@Linux sort Command: Text Sorting](https://labex.io/tutorials/linux-linux-sort-command-text-sorting-219196)

@ -1,6 +1,6 @@
# Tr-Command # Tr-Command
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. 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.
Here's a basic usage example: Here's a basic usage example:
@ -8,4 +8,8 @@ Here's a basic usage example:
echo 'hello' | tr 'a-z' 'A-Z' echo 'hello' | tr 'a-z' 'A-Z'
``` ```
In this example, `tr` is used to convert the lowercase 'hello' to uppercase 'HELLO'. It's an essential tool for text processing tasks in the Linux environment. In this example, `tr` is used to convert the lowercase 'hello' to uppercase 'HELLO'. It's an essential tool for text processing tasks in the Linux environment.
Learn more from the following resources:
- [@article@Linux tr Command: Character Translating](https://labex.io/tutorials/linux-linux-tr-command-character-translating-388064)

@ -1,12 +1,17 @@
# Head Command # Head Command
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. 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.
```bash ```bash
head file.txt head file.txt
``` ```
The number of output lines can be customized using an option. For example, to display first 5 lines, we use `-n` option followed by the number of lines: The number of output lines can be customized using an option. For example, to display first 5 lines, we use `-n` option followed by the number of lines:
```bash ```bash
head -n 5 file.txt head -n 5 file.txt
``` ```
Learn more from the following resources:
- [@article@Linux head Command: File Beginning Display](https://labex.io/tutorials/linux-linux-head-command-file-beginning-display-214302)

@ -1,4 +1,4 @@
# Tail Command # Tail Command
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. 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.
@ -8,4 +8,8 @@ Here is an example of tail command usage:
tail /var/log/syslog tail /var/log/syslog
``` ```
In the above example, the `tail` command will print the last 10 lines of the `/var/log/syslog` file. This is particularly useful in checking the most recent system log entries. In the above example, the `tail` command will print the last 10 lines of the `/var/log/syslog` file. This is particularly useful in checking the most recent system log entries.
Learn more from the following resources:
- [@article@Linux tail Command: File End Display](https://labex.io/tutorials/linux-linux-tail-command-file-end-display-214303)

@ -10,4 +10,8 @@ join file1.txt file2.txt
``` ```
Please note that `join` command works properly only when the files are sorted. Please note that `join` command works properly only when the files are sorted.
It's crucial to understand all the provided options and flags to use `join` effectively in text processing tasks. It's crucial to understand all the provided options and flags to use `join` effectively in text processing tasks.
Learn more from the following resources:
- [@article@Linux join Command: File Joining](https://labex.io/tutorials/linux-linux-join-command-file-joining-219193)

@ -1,4 +1,4 @@
# Introduction to NL (Number Lines) # Introduction to NL (Number Lines)
`nl` command in Linux is a utility for numbering lines in a text file. Also known as 'number lines', it can be handy when you need an overview where certain lines in a file are located. By default, nl number the non-empty lines only, but this behavior can be modified based on user's needs. `nl` command in Linux is a utility for numbering lines in a text file. Also known as 'number lines', it can be handy when you need an overview where certain lines in a file are located. By default, nl number the non-empty lines only, but this behavior can be modified based on user's needs.
@ -8,4 +8,8 @@ It follows a syntax like this:
nl [options] [file_name] nl [options] [file_name]
``` ```
If no file is specified, `nl` will wait for input from user's terminal (stdin). Its clear and readable output makes it a valuable part of any Linux user's text processing toolkit. If no file is specified, `nl` will wait for input from user's terminal (stdin). Its clear and readable output makes it a valuable part of any Linux user's text processing toolkit.
Learn more from the following resources:
- [@article@Linux nl Command: Line Numbering](https://labex.io/tutorials/linux-linux-nl-command-line-numbering-210988)

@ -1,4 +1,4 @@
# WC - Text Processing # WC - Text Processing
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. 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.
@ -9,3 +9,7 @@ wc myfile.txt
``` ```
This command would output the number of lines, words, and characters in `myfile.txt`. The output is displayed in the following order: line count, word count, character count, followed by the filename. This command would output the number of lines, words, and characters in `myfile.txt`. The output is displayed in the following order: line count, word count, character count, followed by the filename.
Learn more from the following resources:
- [@article@Linux wc Command: Text Counting](https://labex.io/tutorials/linux-linux-wc-command-text-counting-219200)

@ -1,5 +1,5 @@
# Uniq # Uniq
In Linux, `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. In Linux, `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.
An example of using `uniq` would be: An example of using `uniq` would be:
@ -8,4 +8,8 @@ An example of using `uniq` would be:
sort names.txt | uniq sort names.txt | uniq
``` ```
In this example, `names.txt` is a file containing a list of names. The `sort` command sorts all the lines in the file, and then the `uniq` command removes all the duplicate lines. The resulting output would be a list of unique names from `names.txt`. In this example, `names.txt` is a file containing a list of names. The `sort` command sorts all the lines in the file, and then the `uniq` command removes all the duplicate lines. The resulting output would be a list of unique names from `names.txt`.
Learn more from the following resources:
- [@article@Linux uniq Command: Duplicate Filtering](https://labex.io/tutorials/linux-linux-uniq-command-duplicate-filtering-219199)

@ -21,3 +21,4 @@ Visit the following resources to learn more:
- [@article@Grep and Regular Expressions for Beginners](https://ryanstutorials.net/linuxtutorial/grep.php) - [@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) - [@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) - [@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)

@ -20,3 +20,4 @@ Visit the following resources to learn more:
- [@article@Linux Handbook: Awk](https://linuxhandbook.com/awk-command-tutorial/) - [@article@Linux Handbook: Awk](https://linuxhandbook.com/awk-command-tutorial/)
- [@video@YouTube](https://www.youtube.com/watch?v=9YOZmI-zWok) - [@video@YouTube](https://www.youtube.com/watch?v=9YOZmI-zWok)
- [@feed@Explore top posts about Bash](https://app.daily.dev/tags/bash?ref=roadmapsh) - [@feed@Explore top posts about Bash](https://app.daily.dev/tags/bash?ref=roadmapsh)
- [@article@Linux awk Command: Text Processing](https://labex.io/tutorials/linux-linux-awk-command-text-processing-388493)

@ -1,4 +1,4 @@
# User Management # User Management
Linux operating system offers a structured user management system, allowing multiple users to interact with the same system in an isolated manner. This includes defining user roles, assigning permissions, groups, ownership and other related aspects, which are crucial tasks for Linux administrators. Linux operating system offers a structured user management system, allowing multiple users to interact with the same system in an isolated manner. This includes defining user roles, assigning permissions, groups, ownership and other related aspects, which are crucial tasks for Linux administrators.
@ -16,4 +16,8 @@ Similarly, `deluser` or `userdel` is used to remove a user:
sudo deluser newuser sudo deluser newuser
``` ```
The entire concept of user management circles around providing proper accessibility, and maintaining the security of the Linux operating system. Other commands such as `passwd` for password management or `su` for switching users further emphasize the depth and importance of user management in Linux. The entire concept of user management circles around providing proper accessibility, and maintaining the security of the Linux operating system. Other commands such as `passwd` for password management or `su` for switching users further emphasize the depth and importance of user management in Linux.
Learn more from the following resources:
- [@article@User Account Management](https://labex.io/tutorials/linux-user-account-management-49)

@ -1,4 +1,4 @@
# Package Management # Package Management
Package Management is a crucial concept in Linux that aids in the handling of packages (collections of files). It not only allows the user to install new software with single commands but also helps manage existing ones. This includes installing, updating, configuring, and removing software packages. Package management incorporates a standardized system that keeps track of every software's prerequisites and takes care of installation, updates and removal. Package Management is a crucial concept in Linux that aids in the handling of packages (collections of files). It not only allows the user to install new software with single commands but also helps manage existing ones. This includes installing, updating, configuring, and removing software packages. Package management incorporates a standardized system that keeps track of every software's prerequisites and takes care of installation, updates and removal.
@ -10,4 +10,8 @@ For instance, to install a package in a Debian-based distribution, you would use
sudo apt-get install <package-name> sudo apt-get install <package-name>
``` ```
Such vital features have made package management systems an integral part of Linux distributions, allowing users to handle applications efficiently. Such vital features have made package management systems an integral part of Linux distributions, allowing users to handle applications efficiently.
Learn more from the following resources:
- [@article@Software Installation on Linux](https://labex.io/tutorials/linux-software-installation-on-linux-18005)
Loading…
Cancel
Save