diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc new file mode 100644 index 0000000000..388691d912 --- /dev/null +++ b/.markdownlint-cli2.jsonc @@ -0,0 +1,11 @@ +{ + // Rules come from .markdownlint.json (auto-detected in this directory) + "globs": [ + "**/*.md" + ], + "ignores": [ + "**/*.{af,de,es,fr,hi,id,it,ja,ko,pt-BR,pt,tr,uk,zh}.md", + "LICENSE.md", + "build_pdf/**" + ] +} diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000000..5d73b603b2 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,129 @@ +{ + "default": true, + "extends": null, + "MD001": true, + "MD003": { + "style": "consistent" + }, + "MD004": { + "style": "consistent" + }, + "MD005": true, + "MD007": { + "indent": 4, + "start_indented": false, + "start_indent": 2 + }, + "MD009": { + "br_spaces": 2, + "list_item_empty_lines": false, + "strict": false + }, + "MD010": { + "code_blocks": true, + "ignore_code_languages": [], + "spaces_per_tab": 1 + }, + "MD011": true, + "MD012": { + "maximum": 1 + }, + "MD013": false, + "MD014": true, + "MD018": true, + "MD019": true, + "MD020": true, + "MD021": true, + "MD022": { + "lines_above": 1, + "lines_below": 1 + }, + "MD023": true, + "MD024": { + "siblings_only": false + }, + "MD025": { + "level": 1, + "front_matter_title": "^\\s*title\\s*[:=]" + }, + "MD026": { + "punctuation": ".,;:!。,;:!" + }, + "MD027": true, + "MD028": true, + "MD029": { + "style": "one_or_ordered" + }, + "MD030": { + "ul_single": 1, + "ol_single": 1, + "ul_multi": 1, + "ol_multi": 1 + }, + "MD031": { + "list_items": true + }, + "MD032": true, + "MD033": { + "allowed_elements": [ + "sub", + "sup" + ] + }, + "MD034": true, + "MD035": { + "style": "consistent" + }, + "MD036": { + "punctuation": ".,;:!?。,;:!?" + }, + "MD037": true, + "MD038": true, + "MD039": true, + "MD040": { + "allowed_languages": [], + "language_only": false + }, + "MD041": { + "level": 1, + "front_matter_title": "^\\s*title\\s*[:=]" + }, + "MD042": true, + "MD043": false, + "MD044": { + "names": [], + "code_blocks": true, + "html_elements": true + }, + "MD045": true, + "MD046": false, + "MD047": true, + "MD048": { + "style": "consistent" + }, + "MD049": { + "style": "consistent" + }, + "MD050": { + "style": "consistent" + }, + "MD051": { + "ignored_pattern": "^contributors-$" + }, + "MD052": { + "shortcut_syntax": false + }, + "MD053": { + "ignored_definitions": [ + "//" + ] + }, + "MD054": { + "autolink": true, + "inline": true, + "full": true, + "collapsed": true, + "shortcut": true, + "url_inline": true + } +} diff --git a/.markdownlint.yml b/.markdownlint.yml deleted file mode 100644 index 24963c55aa..0000000000 --- a/.markdownlint.yml +++ /dev/null @@ -1,272 +0,0 @@ -# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml -# Example markdownlint configuration with all properties set to their default value - -# Default state for all rules -default: true - -# Path to configuration file to extend -extends: null - -# MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md001.md -MD001: true - -# MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md003.md -MD003: - # Heading style - style: "consistent" - -# MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md004.md -MD004: - # List style - style: "consistent" - -# MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md005.md -MD005: true - -# MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md007.md -MD007: - # Spaces for indent - indent: 4 - # Whether to indent the first level of the list - start_indented: false - # Spaces for first level indent (when start_indented is set) - start_indent: 2 - -# MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md009.md -MD009: - # Spaces for line break - br_spaces: 2 - # Allow spaces for empty lines in list items - list_item_empty_lines: false - # Include unnecessary breaks - strict: false - -# MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md010.md -MD010: - # Include code blocks - code_blocks: true - # Fenced code languages to ignore - ignore_code_languages: [] - # Number of spaces for each hard tab - spaces_per_tab: 1 - -# MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md011.md -MD011: true - -# MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md012.md -MD012: - # Consecutive blank lines - maximum: 1 - -# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md -MD013: false - # Number of characters - # line_length: 80 - # Number of characters for headings - # heading_line_length: 80 - # Number of characters for code blocks - # code_block_line_length: 80 - # Include code blocks - # code_blocks: true - # Include tables - # tables: true - # Include headings - # headings: true - # Strict length checking - # strict: false - # Stern length checking - # stern: false - -# MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md014.md -MD014: true - -# MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md018.md -MD018: true - -# MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md019.md -MD019: true - -# MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md020.md -MD020: true - -# MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md021.md -MD021: true - -# MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md022.md -MD022: - # Blank lines above heading - lines_above: 1 - # Blank lines below heading - lines_below: 1 - -# MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md023.md -MD023: true - -# MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md024.md -MD024: - # Only check sibling headings - allow_different_nesting: true - # Only check sibling headings - siblings_only: false - -# MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md025.md -MD025: - # Heading level - level: 1 - # RegExp for matching title in front matter - front_matter_title: "^\\s*title\\s*[:=]" - #front_matter_title: "" - -# MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md026.md -MD026: - # Punctuation characters - punctuation: ".,;:!。,;:!" - -# MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md027.md -MD027: true - -# MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md028.md -MD028: true - -# MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md029.md -MD029: - # List style - style: "one_or_ordered" - -# MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md030.md -MD030: - # Spaces for single-line unordered list items - ul_single: 1 - # Spaces for single-line ordered list items - ol_single: 1 - # Spaces for multi-line unordered list items - ul_multi: 1 - # Spaces for multi-line ordered list items - ol_multi: 1 - -# MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md031.md -MD031: - # Include list items - list_items: true - -# MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md032.md -MD032: true - -# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md033.md -MD033: - # Allowed elements material-mkdocs - allowed_elements: [ - "sub", - "sup" - ] - -# MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md034.md -MD034: true - -# MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md035.md -MD035: - # Horizontal rule style - style: "consistent" - -# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md036.md -MD036: - # Punctuation characters - punctuation: ".,;:!?。,;:!?" - -# MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md037.md -MD037: true - -# MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md038.md -MD038: true - -# MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md039.md -MD039: true - -# MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md040.md -MD040: - # List of languages - allowed_languages: [] - # Require language only - language_only: false - -# MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md041.md -MD041: - # Heading level - level: 1 - # RegExp for matching title in front matter - front_matter_title: "^\\s*title\\s*[:=]" - -# MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md042.md -MD042: true - -# MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md043.md -MD043: false - # List of headings - # headings: [] - # Match case of headings - # match_case: false - -# MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md044.md -MD044: - # List of proper names - names: [] - # Include code blocks - code_blocks: true - # Include HTML elements - html_elements: true - -# MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md045.md -MD045: true - -# MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md046.md -# Disabled for the use of admonitions -MD046: false - # Block style - # style: "consistent" - -# MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md047.md -MD047: true - -# MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md048.md -MD048: - # Code fence style - style: "consistent" - -# MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md049.md -MD049: - # Emphasis style - style: "consistent" - -# MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md050.md -MD050: - # Strong style - style: "consistent" - -# MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md051.md -MD051: true - -# MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md052.md -MD052: - # Include shortcut syntax - shortcut_syntax: false - -# MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md053.md -MD053: - # Ignored definitions - ignored_definitions: - - "//" - -# MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md054.md -MD054: - # Allow autolinks - autolink: true - # Allow inline links and images - inline: true - # Allow full reference links and images - full: true - # Allow collapsed reference links and images - collapsed: true - # Allow shortcut reference links and images - shortcut: true - # Allow URLs as inline links - url_inline: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e2a6892df4..e3ec8da478 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,12 +16,11 @@ repos: - id: check-added-large-files args: ['--maxkb=1024'] - - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.38.0 + - repo: https://github.com/DavidAnson/markdownlint-cli2 + rev: v0.23.2 hooks: - - id: markdownlint - args: [--config, .markdownlint.yml, --fix] - files: \.md$ + - id: markdownlint-cli2 + args: [--fix] exclude: | (?x)^( LICENSE\.md| diff --git a/docs/books/admin_guide/00-toc.md b/docs/books/admin_guide/00-toc.md index e283125647..c8d8c440ba 100644 --- a/docs/books/admin_guide/00-toc.md +++ b/docs/books/admin_guide/00-toc.md @@ -1,9 +1,8 @@ --- -title: Learning Linux With Rocky +title: Learning Linux with Rocky +author: Antoine Le Morvan +contributors: Steven Spencer, Ganna Zhyrnova --- - - -# Learning Linux with Rocky The Administrator's Guide is a collection of educational documents focused on System Administrators. They can be used by future System Administrators trying to get up to speed, by current System Administrators who would like a refresher, or by any Linux user who'd like to learn more about the Linux environment, commands, processes, and more. Like all documents of this type, it will evolve and update over time. diff --git a/docs/books/admin_guide/01-presentation.md b/docs/books/admin_guide/01-presentation.md index f64ebef166..b71fd97ec6 100644 --- a/docs/books/admin_guide/01-presentation.md +++ b/docs/books/admin_guide/01-presentation.md @@ -1,7 +1,9 @@ --- title: Introduction to Linux +author: Antoine Le Morvan +contributors: Steven Spencer, Ganna Zhyrnova --- - + # Introduction to the Linux Operating System diff --git a/docs/books/admin_guide/03-commands.md b/docs/books/admin_guide/03-commands.md index 6af7a9fa6a..18664f6798 100644 --- a/docs/books/admin_guide/03-commands.md +++ b/docs/books/admin_guide/03-commands.md @@ -3,7 +3,7 @@ title: Linux Commands author: Antoine Le Morvan contributors: Steven Spencer, Aditya Putta, tianci li, Grammaresque, Ganna Zhyrnova --- - + # Commands for Linux Users In this chapter you will learn Linux commands and how to use them. @@ -120,7 +120,7 @@ It is impossible for an administrator at any level to know all the commands and The command `apropos` allows you to search by keyword within these manual pages: -| Options | Description | +| Options | Description | | ------------------------------------------- | ---------------------------------------------------------- | | `-s`, `--sections list` or `--section list` | Limited to manual sections. | | `-a` or `--and` | Displays only the item matching all the provided keywords. | @@ -222,10 +222,10 @@ Examples: Options: -| Options | Remarks | -| ------- | -------------------------------- | +| Options | Remarks | +| ------- | ------------------------------------- | | `-h` | Shuts down the system electronically. | -| `-r` | Restarts the system. | +| `-r` | Restarts the system. | ### `history` command @@ -241,8 +241,8 @@ $ history 148 man history ``` -| Options | Comments | -| ------- | ------------------------------------------------------------------------------------------------------------------ | +| Options | Comments | +| ------- | ---------------------------------------------------------------------------------------------- | | `-w` | Writes the current history to the history file. | | `-c` | Deletes the history of the current session (but not the contents of the `.bash_history` file). | @@ -250,13 +250,13 @@ $ history To manipulate the history, the following commands entered from the command prompt will: -| Keys | Function | -| ------------------ | --------------------------------------------------------- | -| ++exclam+exclam++ | Recalls the last command placed. | -| ++exclam+n++ | Recalls the command by its number in the list. | -| ++exclam+"string"++ | Recalls the most recent command beginning with the string. | -| ++arrow-up++ | Navigates through your history working backward in time from the most recent command. | -| ++arrow-down++ | Navigates through your history working forward in time. | +| Keys | Function | +| ------------------- | ------------------------------------------------------------------------------------- | +| ++exclam+exclam++ | Recalls the last command placed. | +| ++exclam+n++ | Recalls the command by its number in the list. | +| ++exclam+"string"++ | Recalls the most recent command beginning with the string. | +| ++arrow-up++ | Navigates through your history working backward in time from the most recent command. | +| ++arrow-down++ | Navigates through your history working forward in time. | ### Auto-complete @@ -303,11 +303,11 @@ Among the frequently used sequences, we can mention: | Sequence | Result | | -------- | --------------------- | -| `\a` | Sends a sonar beep | +| `\a` | Sends a sonar beep | | `\b` | Back | | `\n` | Adds a line break | | `\t` | Adds a horizontal tab | -| `\v` | Adds a vertical tab | +| `\v` | Adds a vertical tab | ### `date` command @@ -478,24 +478,28 @@ $ ls /home The main options of the `ls` command are: -| Option | Information | -| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `-a` | Displays all files, even hidden ones. Hidden files in Linux are those beginning with `.`. | -| `-i` | Displays inode numbers. | -| `-l` | Use a long listing format, that is, each line displays long format information for a file or directory. | +| Option | Information | +| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | +| `-a` | Displays all files, even hidden ones. Hidden files in Linux are those beginning with `.`. | +| `-i` | Displays inode numbers. | +| `-l` | Use a long listing format, that is, each line displays long format information for a file or directory. | The `ls` command, however, has a lot of options (see `man`): -| Option | Information | -| ------ | ------------ | -| `-d` | Displays information about a directory instead of listing its contents. | -| `-g` | Like -l option, but do not list owner. | -| `-h` | Displays file sizes in the most appropriate format (byte, kilobyte, megabyte, gigabyte, ...). `h` stands for Human Readable. Needs to be used with -l option. | -| `-s` | Displays the allocated size of each file, in blocks. In the `ls` command, the default size of a single block is 1024-Byte. In the GNU/Linux operating system, "block" is the smallest unit of storage in the file system, and generally speaking, one block is equal to 4096-Byte. In the Windows operating system, taking the NTFS file system as an example, its smallest storage unit is called a "Cluster". The definition of the minimum storage unit name may vary depending on different file systems. | -| `-A` | Displays all files in the directory except `.` and `..` | -| `-R` | Displays the contents of subdirectories recursively. | -| `-F` | Displays the type of files. Prints a `/` for a directory, `*` for executables, `@` for a symbolic link, and nothing for a text file. | -| `-X` | Sorts files according to their extensions. | +| Option | Information | +| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `-d` | Displays information about a directory instead of listing its contents. | +| `-g` | Like -l option, but do not list owner. | +| `-h` | Displays file sizes in the most appropriate format (byte, kilobyte, megabyte, gigabyte, ...). `h` stands for Human Readable. Needs to be used with -l option. | +| `-s` | Displays the allocated size of each file, in blocks. | +| `-A` | Displays all files in the directory except `.` and `..` | +| `-R` | Displays the contents of subdirectories recursively. | +| `-F` | Displays the type of files. Prints a `/` for a directory, `*` for executables, `@` for a symbolic link, and nothing for a text file. | +| `-X` | Sorts files according to their extensions. | + +!!! Note + + In the `ls` command, the default size of a single block is 1024-Byte. In the GNU/Linux operating system, "block" is the smallest unit of storage in the file system, and generally speaking, one block is equal to 4096-Byte. In the Windows operating system, taking the NTFS file system as an example, its smallest storage unit is called a "Cluster". The definition of the minimum storage unit name may vary depending on different file systems. * Description of columns generated by running the `ls -lia` command: @@ -504,16 +508,16 @@ $ ls -lia /home 78489 drwx------ 4 rockstar rockstar 4096 25 oct. 08:10 rockstar ``` -| Value | Information | -| --------------- | ------------------------------------------------------------------------------------------------------------- | -| `78489` | Inode Number. | -| `drwx------` | File type (`d`) and rights (`rwx------`). | -| `4` | Number of subdirectories (`.` and `..` included). For a file, it represents the number of hard links, and 1 represents itself. | -| `rockstar` | User ownership. | -| `rockstar` | Group ownership. | +| Value | Information | +| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `78489` | Inode Number. | +| `drwx------` | File type (`d`) and rights (`rwx------`). | +| `4` | Number of subdirectories (`.` and `..` included). For a file, it represents the number of hard links, and 1 represents itself. | +| `rockstar` | User ownership. | +| `rockstar` | Group ownership. | | `4096` | For files, it shows the size of the file. For directories, it shows the fixed value of 4096 bytes occupied by the file naming. To calculate the total size of a directory, use `du -sh rockstar/` | -| `25 oct. 08:10` | Last modified date. | -| `rockstar` | The name of the file (or directory). | +| `25 oct. 08:10` | Last modified date. | +| `rockstar` | The name of the file (or directory). | !!! Note @@ -646,9 +650,9 @@ Example: touch /home/rockstar/myfile ``` -| Option | Information | -| --------------------------------- | -------------------------------------------------------------------------- | -| `-t date` | Changes the date of last modification of the file with the specified date. | +| Option | Information | +| --------- | -------------------------------------------------------------------------- | +| `-t date` | Changes the date of last modification of the file with the specified date. | Date format: `[AAAA]MMJJhhmm[ss]` @@ -666,9 +670,9 @@ Example: rmdir /home/rockstar/work ``` -| Option | Information | -| ----------------------------------------------------------------------- | ----------- | -| `-p` | Removes the parent directory or directories provided if they are empty. | +| Option | Information | +| ------ | ------------------------------------------------------------------------ | +| `-p` | Removes the parent directory or directories provided if they are empty. | !!! Tip @@ -686,11 +690,11 @@ rm [-f] [-r] file [file] [...] Any deletion of a file or directory is final. -| Options | Information | -| ------- | ---------------------------------------- | -| `-f` | Do not ask whether to delete. | -| `-i` | Ask whether to delete. | -| `-r` | Delete a directory and recursively delete its subdirectories. | +| Options | Information | +| ------- | ------------------------------------------------------------- | +| `-f` | Do not ask whether to delete. | +| `-i` | Ask whether to delete. | +| `-r` | Delete a directory and recursively delete its subdirectories. | !!! Note @@ -727,10 +731,10 @@ mv /home/rockstar/file1 /home/rockstar/file2 mv /home/rockstar/file1 /home/rockstar/file2 /tmp ``` -| Options | Information | -| ------------------------------------------------------------------------------ | --------------------------------------------------------------- | -| `-f` | Don't ask for confirmation if overwriting the destination file. | -| `-i` | Request confirmation if overwriting destination file (default). | +| Options | Information | +| ------- | --------------------------------------------------------------- | +| `-f` | Don't ask for confirmation if overwriting the destination file. | +| `-i` | Request confirmation if overwriting destination file (default). | A few concrete cases will help you understand the difficulties that can arise: @@ -790,7 +794,7 @@ cp -r /home/rockstar /tmp | `-f` | Do not ask for confirmation if overwriting the destination file. | | `-p` | Keeps the owner, permissions and timestamp of the copied file. | | `-r` | Copies a directory with its files and subdirectories. | -| `-s` | Creates a symbolic link rather than copying. | +| `-s` | Creates a symbolic link rather than copying. | ```bash cp file1 /repexist/file2 @@ -862,16 +866,16 @@ less file1 [files] The commands specific to `less` are: -| Command | Action | -| ----------------- | ----------------------------------------------- | -| ++"h"++ or ++h++ | Help. | -| ++arrow-up++ ++arrow-down++ ++arrow-right++ ++arrow-left++ | Move up, down a line, or to the right or left. | -| ++enter++ | Move down one line. | -| ++space++ | Move down one page. | -| ++page-up++ and ++page-down++ | Move up or down one page. | -| ++"g"++ and ++g++ | Move to the first and last pages | -| `/text` | Search for text. | -| ++"q"++ or ++q++ | Quit the `less` command. | +| Command | Action | +| ---------------------------------------------------------- | ----------------------------------------------- | +| ++"h"++ or ++h++ | Help. | +| ++arrow-up++ ++arrow-down++ ++arrow-right++ ++arrow-left++ | Move up, down a line, or to the right or left. | +| ++enter++ | Move down one line. | +| ++space++ | Move down one page. | +| ++page-up++ and ++page-down++ | Move up or down one page. | +| ++"g"++ and ++g++ | Move to the first and last pages | +| `/text` | Search for text. | +| ++"q"++ or ++q++ | Quit the `less` command. | ### `cat` command @@ -943,7 +947,7 @@ The `head` command displays the beginning of a file. head [-n x] file ``` -| Option | Description | +| Option | Description | | ----------------------------------------------------------------------------------------------------- | --------------------------------------- | | `-n x` | Display the first `x` lines of the file | @@ -957,7 +961,7 @@ The `tail` command displays the end of a file. tail [-f] [-n x] file ``` -| Option | Description | +| Option | Description | | -------- | ----------------------------------------- | | `-n x` | Displays the last `x` lines of the file | | `-f` | Displays changes to the file in real time | @@ -993,14 +997,14 @@ root:x:0:0:root:/root:/bin/bash adm:x:3:4:adm:/var/adm/:/sbin/nologin ``` -| Option | Description | -| --------- | ------------------------------------------- | -| `-k` | Specify the columns to be separated. You can specify multiple columns. | -| `-n` | Requests a numeric sort. | -| `-o file` | Saves the sort to the specified file. | -| `-t` | Specify a delimiter, which requires that the contents of the corresponding file must be regularly delimited column contents, otherwise they cannot be sorted properly. | -| `-r` | Reverse the order of the result. Used in conjunction with the `-n` option to sort in order from largest to smallest. | -| `-u` | Remove duplicates after sorting. Equivalent to `sort FILE | uniq` command. | +| Option | Description | +| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `-k` | Specify the columns to be separated. You can specify multiple columns. | +| `-n` | Requests a numeric sort. | +| `-o file` | Saves the sort to the specified file. | +| `-t` | Specify a delimiter, which requires that the contents of the corresponding file must be regularly delimited column contents, otherwise they cannot be sorted properly. | +| `-r` | Reverse the order of the result. Used in conjunction with the `-n` option to sort in order from largest to smallest. | +| `-u` | Remove duplicates after sorting. Equivalent to `sort FILE | uniq` command. | The `sort` command sorts the file only on the screen. The file is not modified by the sorting. To save the sort, use the `-o` option or an output redirection `>`. @@ -1113,7 +1117,7 @@ The `wc` command counts the number of lines, words and/or bytes in a file. wc [-l] [-m] [-w] file [files] ``` -| Option | Description | +| Option | Description | | ------ | ------------------------------- | | `-c` | Count the number of bytes. | | `-m` | Count the number of characters. | @@ -1184,7 +1188,7 @@ ls: /bin/ls | Option | Description | | ------ | ------------------------------- | -| `-b` | Searches only the binary file. | +| `-b` | Searches only the binary file. | | `-m` | Searches only for man pages. | | `-s` | Searches only for source files. | @@ -1203,11 +1207,11 @@ $ grep -w "root:" /etc/passwd root:x:0:0:root:/root:/bin/bash ``` -| Option | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------- | -| `-i` | Ignores the case of the searched string. | -| `-v` | Excludes lines containing the string. | -| `-w` | Searches for the exact word. | +| Option | Description | +| ------ | ---------------------------------------- | +| `-i` | Ignores the case of the searched string. | +| `-v` | Excludes lines containing the string. | +| `-w` | Searches for the exact word. | The `grep` command returns the complete line containing the string you are looking for. diff --git a/docs/books/admin_guide/04-advanced-commands.md b/docs/books/admin_guide/04-advanced-commands.md index 94c904dada..a38da988ad 100644 --- a/docs/books/admin_guide/04-advanced-commands.md +++ b/docs/books/admin_guide/04-advanced-commands.md @@ -1,5 +1,7 @@ --- title: Advanced Linux Commands +author: Antoine Le Morvan +contributors: Steven Spencer, Ganna Zhyrnova --- # Advanced Commands for Linux users @@ -379,15 +381,15 @@ install -d directory Options: -| Options | Remarks                           | -| ------- | ------------------------------------------------------------ | -| `-b` or `--backup[=suffix]` | creates a backup of destination file | -| `-d`    | treats arguments as directory names               | -| `-D`    | creates all leading components before copying SOURCE to DEST | -| `-g` and `-o`    | sets ownership               | -| `-m`    | sets permissions               | -| `-p`    | preserves the timestamps of the sources files           | -| `-t` | copies all source arguments to the directory | +| Options | Remarks                           | +| --------------------------- | ------------------------------------------------------------ | +| `-b` or `--backup[=suffix]` | creates a backup of destination file | +| `-d`    | treats arguments as directory names               | +| `-D`    | creates all leading components before copying SOURCE to DEST | +| `-g` and `-o`    | sets ownership               | +| `-m`    | sets permissions               | +| `-p`    | preserves the timestamps of the sources files           | +| `-t` | copies all source arguments to the directory | !!! note diff --git a/docs/books/admin_guide/05-vi.md b/docs/books/admin_guide/05-vi.md index aec9b35ba5..68ccd4ed7c 100644 --- a/docs/books/admin_guide/05-vi.md +++ b/docs/books/admin_guide/05-vi.md @@ -1,5 +1,7 @@ --- title: VI Text Editor +author: Antoine Le Morvan +contributors: Steven Spencer, Ganna Zhyrnova --- # VI Text Editor diff --git a/docs/books/admin_guide/06-users.md b/docs/books/admin_guide/06-users.md index 9207948fba..7ca6248a18 100644 --- a/docs/books/admin_guide/06-users.md +++ b/docs/books/admin_guide/06-users.md @@ -1,9 +1,9 @@ --- title: User Management +author: Antoine Le Morvan +contributors: Steven Spencer, Ganna Zhyrnova --- -# User Management - In this chapter you will learn how to manage users. **** @@ -84,10 +84,10 @@ Example: sudo groupadd -g 1012 GroupeB ``` -| Option | Description | -| -------- | ----------------------------------------- | -| `-g GID` | Defines the `GID` of the group to create. | -| `-f` | The system chooses a `GID` if the one specified by the `-g` option already exists. | +| Option | Description | +| -------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `-g GID` | Defines the `GID` of the group to create. | +| `-f` | The system chooses a `GID` if the one specified by the `-g` option already exists. | | `-r` | Creates a system group with a `GID` between `SYS_GID_MIN` and `SYS_GID_MAX`. These two variables are defined in `/etc/login.defs`. | Group naming rules: @@ -288,17 +288,17 @@ Example: sudo useradd -u 1000 -g 1013 -d /home/GroupC/carine carine ``` -| Option | Description | -| --------------| ---------------------------------------------------------------------- | -|`-u UID` | `UID` of the user to create. | -|`-g GID` | `GID` of the primary group. The `GID` here can also be a `group name`. | -|`-G GID1,[GID2]...` | `GID` of the supplementary groups. The `GID` here can also be a `group name`. It is possible to specify many supplementary groups separated by commas. | -|`-d directory` | Creates the home directory. | -|`-s shell` | Specifies the user's shell. | -|`-c COMMENT` | Adds a comment. | -|`-U` | Adds the user to a group with the same name created simultaneously. If not specified, the creation of a group with the same name occurs when creating the user. | -|`-M` | Does not create the user's home directory. | -|`-r` | Creates a system account. | +| Option | Description | +| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|`-u UID` | `UID` of the user to create. | +|`-g GID` | `GID` of the primary group. The `GID` here can also be a `group name`. | +|`-G GID1,[GID2]...` | `GID` of the supplementary groups. The `GID` here can also be a `group name`. It is possible to specify many supplementary groups separated by commas. | +|`-d directory` | Creates the home directory. | +|`-s shell` | Specifies the user's shell. | +|`-c COMMENT` | Adds a comment. | +|`-U` | Adds the user to a group with the same name created simultaneously. If not specified, the creation of a group with the same name occurs when creating the user. | +|`-M` | Does not create the user's home directory. | +|`-r` | Creates a system account. | At creation, the account has no password and is locked. @@ -378,14 +378,14 @@ Example: sudo useradd -D -g 1000 -b /home -s /bin/bash ``` -| Option | Description | -| -------------- | -------------------------------------------------------------------------------- | -| `-D` | Sets the default values for user creation. | -| `-b base_directory` | Defines the base directory for the user's home directory. If you do not specify this option, use the HOME variable in the /etc/default/useradd file or /home/ | -| `-g group` | Sets the default group. | -| `-s shell` | Sets the default shell. | -| `-f` | Sets the number of days after the password expires before disabling the account. | -| `-e` | Sets the date for disabling the account. | +| Option | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `-D` | Sets the default values for user creation. | +| `-b base_directory` | Defines the base directory for the user's home directory. If you do not specify this option, use the HOME variable in the `/etc/default/useradd` file or `/home/` | +| `-g group` | Sets the default group. | +| `-s shell` | Sets the default shell. | +| `-f` | Sets the number of days after the password expires before disabling the account. | +| `-e` | Sets the date for disabling the account. | ### `usermod` command @@ -403,15 +403,15 @@ sudo usermod -u 1044 carine Options identical to the `useradd` command. -| Option | Description | -| -------------- | --------------------------------------------------------------------------------------------- | -|`-m` | Associated with the `-d` option. Moves the contents of the old login directory to the new one. If the old home directory does not exist, creation of a new home directory does not occur; Creation of the new home directory occurs when it does not exist.| -|`-l login` | Modifies the login name. After you modify the login name, you also need to modify the name of the home directory to match it. | -|`-e YYYY-MM-DD` | Modifies the account expiration date. | -|`-L` | Locks the account permanently. That is, it adds an `!` at the beginning of the `/etc/shadow` password field. | -|`-U` | Unlocks the account. | -|`-a` | Appends the user's supplementary groups, which must be used together with the `-G` option. | -|`-G` | Modifies the user's supplementary groups and overwrites previous supplementary groups. | +| Option | Description | +| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|`-m` | Associated with the `-d` option. Moves the contents of the old login directory to the new one. If the old home directory does not exist, creation of a new home directory does not occur; Creation of the new home directory occurs when it does not exist. | +|`-l login` | Modifies the login name. After you modify the login name, you also need to modify the name of the home directory to match it. | +|`-e YYYY-MM-DD` | Modifies the account expiration date. | +|`-L` | Locks the account permanently. That is, it adds an `!` at the beginning of the `/etc/shadow` password field. | +|`-U` | Unlocks the account. | +|`-a` | Appends the user's supplementary groups, which must be used together with the `-G` option. | +|`-G` | Modifies the user's supplementary groups and overwrites previous supplementary groups. | !!! Tip @@ -465,8 +465,8 @@ The `userdel` command lets you delete a user's account. sudo userdel -r carine ``` -| Option | Description | -| -------| --------------------------------------------------------- | +| Option | Description | +| -------| -------------------------------------------------------------------------------------------- | | `-r` | Deletes the user's home directory and mail files located in the `/var/spool/mail/` directory | !!! Tip @@ -602,10 +602,10 @@ Example: sudo chgrp group1 file ``` -| Option | Description | -| ------ | ------------------------------------------------------------------------ | +| Option | Description | +| ------ | ---------------------------------------------------------------------------------- | | `-R` | Recursively changes the groups of the directory and all files under the directory. | -| `-v` | Displays the changes. | +| `-v` | Displays the changes. | !!! Note @@ -736,17 +736,17 @@ sudo passwd -l albert sudo passwd -n 60 -x 90 -w 80 -i 10 patrick ``` -| Option | Description | -| ------ | ------------------------------------------------------ | -| `-d` | Permanently removes the password. For root (uid=0) use only. | -| `-l` | Permanently locks the user account. For root (uid=0) use only. | -| `-S` | Displays the account status. For root (uid=0) use only. | -| `-u` | Permanently unlocks user account. For root (uid=0) use only. | -| `-e` | Permanently expires the password. For root (uid=0) use only. | -| `-n DAYS` | Defines the minimum password lifetime. Permanent change. For root (uid=0) use only. | -| `-x DAYS` | Defines the maximum password lifetime. Permanent change. For root (uid=0) use only. | -| `-w DAYS` | Defines the warning time before expiration. Permanent change. For root (uid=0) use only. | -| `-i DAYS` | Defines the delay before deactivation when the password expires. Permanent change. For root (uid=0) use only.| +| Option | Description | +| --------- | ------------------------------------------------------------------------------------------------------------- | +| `-d` | Permanently removes the password. For root (uid=0) use only. | +| `-l` | Permanently locks the user account. For root (uid=0) use only. | +| `-S` | Displays the account status. For root (uid=0) use only. | +| `-u` | Permanently unlocks user account. For root (uid=0) use only. | +| `-e` | Permanently expires the password. For root (uid=0) use only. | +| `-n DAYS` | Defines the minimum password lifetime. Permanent change. For root (uid=0) use only. | +| `-x DAYS` | Defines the maximum password lifetime. Permanent change. For root (uid=0) use only. | +| `-w DAYS` | Defines the warning time before expiration. Permanent change. For root (uid=0) use only. | +| `-i DAYS` | Defines the delay before deactivation when the password expires. Permanent change. For root (uid=0) use only. | Use `password -l`, that is, add "!!" at the beginning of the password field of the user corresponding to `/etc/shadow`. @@ -798,15 +798,15 @@ Example: sudo chage -m 60 -M 90 -W 80 -I 10 alain ``` -| Option | Description | -| ------ | ---------------------------------------------- | -| `-I DAYS` | Defines the days to delay before deactivation, password expired. Permanent change.| -| `-l` | Displays the policy details. | -| `-m DAYS` | Defines the minimum lifetime of the password. Permanent change. | -| `-M DAYS` | Defines the maximum lifetime of the password. Permanent change. | -| `-d LAST_DAY` | Defines the number of days since the password was last changed. You can use the days' timestamp style or the YYYY-MM-DD style. Permanent change. | -| `-E EXPIRE_DATE` | Defines the account expiration date. You can use the days' timestamp style or the YYYY-MM-DD style. Permanent change. | -| `-W WARN_DAYS` | Defines the number of days warning time before expiration. Permanent change. | +| Option | Description | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `-I DAYS` | Defines the days to delay before deactivation, password expired. Permanent change. | +| `-l` | Displays the policy details. | +| `-m DAYS` | Defines the minimum lifetime of the password. Permanent change. | +| `-M DAYS` | Defines the maximum lifetime of the password. Permanent change. | +| `-d LAST_DAY` | Defines the number of days since the password was last changed. You can use the days' timestamp style or the YYYY-MM-DD style. Permanent change. | +| `-E EXPIRE_DATE` | Defines the account expiration date. You can use the days' timestamp style or the YYYY-MM-DD style. Permanent change. | +| `-W WARN_DAYS` | Defines the number of days warning time before expiration. Permanent change. | Examples: @@ -855,15 +855,15 @@ SKEL=/etc/skel CREATE_MAIL_SPOOL=yes ``` -| Parameters | Comment | -| ---------- | ---------------------------------------------------------------------------------- | -| `GROUP` | Defines the default primary group GID. | -| `HOME` | Defines the directory path of the upper level of the common user's home directory. | -| `INACTIVE` | Defines the number of days of grace after password expiration. Corresponds to the 7th field of the `/etc/shadow` file. `-1` value means that the grace period feature is turned off.| -| `EXPIRE` | Defines the account expiration date. Corresponds to the 8th field of the `/etc/shadow` file. | -| `SHELL` | Defines the command interpreter. | -| `SKEL` | Defines the skeleton directory of the login directory. | -| `CREATE_MAIL_SPOOL` | Defines the mailbox creation in `/var/spool/mail/`. | +| Parameters | Comment | +| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `GROUP` | Defines the default primary group GID. | +| `HOME` | Defines the directory path of the upper level of the common user's home directory. | +| `INACTIVE` | Defines the number of days of grace after password expiration. Corresponds to the 7th field of the `/etc/shadow` file. `-1` value means that the grace period feature is turned off. | +| `EXPIRE` | Defines the account expiration date. Corresponds to the 8th field of the `/etc/shadow` file. | +| `SHELL` | Defines the command interpreter. | +| `SKEL` | Defines the skeleton directory of the login directory. | +| `CREATE_MAIL_SPOOL` | Defines the mailbox creation in `/var/spool/mail/`. | If you do not need a primary group with the same name when creating users, you can do this: diff --git a/docs/books/admin_guide/07-file-systems.md b/docs/books/admin_guide/07-file-systems.md index 35cfbdd891..aebe286291 100644 --- a/docs/books/admin_guide/07-file-systems.md +++ b/docs/books/admin_guide/07-file-systems.md @@ -7,8 +7,6 @@ tags: - system administration --- -# File System - In this chapter, you will learn how to work with file systems. --- @@ -78,7 +76,7 @@ What we call *devices* are the files stored without `/dev`, identifying the diff The service called udev is responsible for applying the naming conventions (rules) and applying them to the devices it detects. -For more information, please see [here](https://www.kernel.org/doc/html/latest/admin-guide/devices.html). +For more information, please see [the kernel administration documentation](https://www.kernel.org/doc/html/latest/admin-guide/devices.html). ### Device partition number @@ -172,20 +170,26 @@ The partition created by the **standard partition** cannot dynamically adjust th The principle of LVM is very simple: - a logical abstraction layer is added between the physical disk (or disk partition) and the file system -- merge multiple disks (or disk partition) into Volume Group(**VG**) -- perform underlying disk management operations on them through something called Logical Volume(**LV**). +- merge multiple disks (or disk partition) into Volume Group (**VG**) +- perform underlying disk management operations on them through something called Logical Volume (**LV**). -**The physical media**: The storage medium of the LVM can be the entire hard disk, disk partition, or RAID array. The device must be converted, or initialized, to an LVM Physical Volume(**PV**), before further operations can be performed. +The physical media +: The storage medium of the LVM can be the entire hard disk, disk partition, or RAID array. The device must be converted, or initialized, to an LVM Physical Volume(**PV**), before further operations can be performed. -**PV(Physical Volume)** is the basic storage logic block of LVM. You can create a physical volume by using a disk partition or the disk itself. +PV (Physical Volume) +: is the basic storage logic block of LVM. You can create a physical volume by using a disk partition or the disk itself. -**VG(Volume Group)**: Similar to physical disks in a standard partition, a VG consists of one or more PV. +VG (Volume Group) +: Similar to physical disks in a standard partition, a VG consists of one or more PV. -**LV(Logical Volume)**: Similar to hard disk partitions in standard partitions, LV is built on top of VG. You can set up a file system on LV. +LV (Logical Volume) +: Similar to hard disk partitions in standard partitions, LV is built on top of VG. You can set up a file system on LV. -PE: The smallest unit of storage that can be allocated in a Physical Volume, default to 4MB. You can specify an additional size. +PE +: The smallest unit of storage that can be allocated in a Physical Volume, default to **4MB**. You can specify an additional size. -LE: The smallest unit of storage that can be allocated in a Logical Volume. In the same VG, PE, and LE are the same and correspond one to one. +LE +: The smallest unit of storage that can be allocated in a Logical Volume. In the same VG, PE, and LE are the same and correspond one to one. ![Volume group, PE size equal to 4MB](images/07-file-systems-004.png) @@ -780,10 +784,18 @@ There are two types of link files: Their main features are: -| Link types | Description | -| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Soft link file | This file is similar to a shortcut for Windows. It has permission of 0777 and points to the original file. When the original file is deleted, you can use `ls -l` to view the output information of the soft link file. In the output information, the file name of the soft link appears in red, and the pointed original file appears in red with a flashing prompt. | -| Hard link file | This file represents different mappings occupying the same *inode* number. They can be updated synchronously (including file content, modification time, owner, group affiliation, access time, etc.). Hard-linked files cannot span partitions and file systems and cannot be used in directories. | +| Link types | Description | +| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Soft link file | This file is similar to a shortcut for Windows. It has permission of 0777 and points to the original file. | +| Hard link file | This file represents different mappings occupying the same *inode* number. They can be updated synchronously (including file content, modification time, owner, group affiliation, access time, etc.). | + +!!! note + + When the original file is deleted, you can use `ls -l` to view the output information of the soft link file. In the output information, the file name of the soft link appears in red, and the pointed original file appears in red with a flashing prompt. + +!!! warning + + Hard-linked files cannot span partitions and file systems and cannot be used in directories Specific examples are as follows: diff --git a/docs/books/admin_guide/08-process.md b/docs/books/admin_guide/08-process.md index c2e800ec83..994cf4555d 100644 --- a/docs/books/admin_guide/08-process.md +++ b/docs/books/admin_guide/08-process.md @@ -1,9 +1,9 @@ --- title: Process Management +author: Antoine Le Morvan +contributors: Steven Spencer, Ganna Zhyrnova --- -# Process Management - In this chapter, you will learn how to work with processes. **** @@ -29,19 +29,22 @@ An operating system consists of processes. These processes are executed in a spe When a program runs, the system will create a process by placing the program data and code in memory and creating a **runtime stack**. A process is an instance of a program with an associated processor environment (ordinal counter, registers, etc...) and memory environment. -Each process has: +Each process has a : + +PID +: _**P**rocess **ID**entifier_, a unique process identifier -* a *PID*: _**P**rocess **ID**entifier_, a unique process identifier -* a *PPID*: _**P**arent **P**rocess **ID**entifier_, unique identifier of parent process +PPID +: _**P**arent **P**rocess **ID**entifier_, unique identifier of parent process By successive filiations, the `init` process is the father of all processes. * A parent process always creates a process * A parent process can have multiple child processes -There is a parent/child relationship between processes. A child process results from the parent calling the *fork()* primitive and duplicating its code to create a child. The *PID* of the child is returned to the parent process so that it can talk to it. Each child has its parent's identifier, the *PPID*. +There is a parent/child relationship between processes. A child process results from the parent calling the _fork()_ primitive and duplicating its code to create a child. The _PID_ of the child is returned to the parent process so that it can talk to it. Each child has its parent's identifier, the _PPID_. -The *PID* number represents the process at the time of execution. When the process finishes, the number is available again for another process. Running the same command several times will produce a different *PID* each time. +The _PID_ number represents the process at the time of execution. When the process finishes, the number is available again for another process. Running the same command several times will produce a different _PID_ each time. @@ -66,7 +69,7 @@ Example: | Option | Description | |------------|----------------------------------| | `-e` | Displays all processes. | -| `-f` | Displays full format list. | +| `-f` | Displays full format list. | | `-u` login | Displays the user's processes. | Some additional options: @@ -77,9 +80,9 @@ Some additional options: | `-t tty` | Displays the processes running from the terminal. | | `-p PID` | Displays the process information. | | `-H` | Displays the information in a tree structure. | -| `-l` | Displays in long format. | +| `-l` | Displays in long format. | | `--sort COL` | Sort the result according to a column. | -| `--headers` | Displays the header on each terminal page. | +| `--headers` | Displays the header on each terminal page. | | `--format "%a %b %c"` | Customize the output display format. | Without an option specified, the `ps` command only displays processes running from the current terminal. @@ -92,7 +95,7 @@ UID PID PPID C STIME TTY TIME CMD root 1 0 0 Jan01 ? 00:00/03 /sbin/init ``` -| Column | Description | +| Column | Description | |----------|-----------------------------| | `UID` | Owner user. | | `PID` | Process identifier. | @@ -125,14 +128,14 @@ The user process: * is started from a terminal associated with a user * accesses resources via requests or daemons -The system process (*daemon*): +The system process (_daemon_): * is started by the system * is not associated with any terminal and is owned by a system user (often `root`) * is loaded at boot time, resides in memory, and is waiting for a call * is usually identified by the letter `d` associated with the process name -System processes are therefore called daemons (***D**isk **A**nd **E**xecution **MON**itor*). +System processes are therefore called daemons (_**D**isk **A**nd **E**xecution **MON**itor_). ## Permissions and rights @@ -204,13 +207,13 @@ Example: kill -9 1664 ``` -| Code | Signal | Description | -|------|-----------|--------------------------------------------------------| -| `2` | *SIGINT* | Immediate termination of the process | -| `9` | *SIGKILL* | Interrupts the process (++control+"d"++) | -| `15` | *SIGTERM* | Clean termination of the process | -| `18` | *SIGCONT* | Resumes the process. Processes that use the SIGSTOP signal can use it to continue running | -| `19` | *SIGSTOP* | Suspends the process (Stops process). The effect of this signal is equivalent to ++ctrl+"z"++ | +| Code | Signal | Description | +| ---- | --------- | --------------------------------------------------------------------------------------------------- | +| `2` | _SIGINT_ | Immediate termination of the process | +| `9` | _SIGKILL_ | Interrupts the process ( ++control++ + ++"d"++ ) | +| `15` | _SIGTERM_ | Clean termination of the process | +| `18` | _SIGCONT_ | Resumes the process. Processes that use the SIGSTOP signal can use it to continue running | +| `19` | _SIGSTOP_ | Suspends the process (Stops process). The effect of this signal is equivalent to ++ctrl++ + ++"z"++ | Signals are the means of communication between processes. The `kill` command sends a signal to a process. @@ -248,7 +251,7 @@ The synchronous process is temporarily suspended by pressing the ++control+"z"++ ### `&` instruction -The `&` statement executes the command asynchronously (the command is then called *job*) and displays the number of *job*. Access to the prompt is then returned. +The `&` statement executes the command asynchronously (the command is then called _job_) and displays the number of _job_. Access to the prompt is then returned. Example: @@ -258,7 +261,7 @@ $ time ls -lR / > list.ls 2> /dev/null & $ ``` -The *job* number is obtained during background processing and is displayed in square brackets, followed by the `PID` number. +The _job_ number is obtained during background processing and is displayed in square brackets, followed by the `PID` number. ### `fg` and `bg` commands @@ -303,7 +306,7 @@ The columns represent: * a `+` : The process selected by default for the `fg` and `bg` commands when no job number is specified * a `-` : This process is the next process to take the `+` -3. *Running* (running process) or *Stopped* (suspended process) +3. _Running_ (running process) or _Stopped_ (suspended process) 4. the command ### `nice` and `renice` commands @@ -380,7 +383,7 @@ PID USER PR NI ... %CPU %MEM TIME+ COMMAND 2514 root 20 0 15 5.5 0:01.14 top ``` -| Column | Description | +| Column | Description | |-----------|-----------------------| | `PID` | Process identifier. | | `USER` | Owner user. | @@ -395,9 +398,9 @@ The `top` command allows control of the processes in real-time and in interactiv ### `pgrep` and `pkill` commands -The `pgrep` command searches the running processes for a process name and displays the *PID* matching the selection criteria on the standard output. +The `pgrep` command searches the running processes for a process name and displays the _PID_ matching the selection criteria on the standard output. -The `pkill` command will send each process the specified signal (by default *SIGTERM*). +The `pkill` command will send each process the specified signal (by default _SIGTERM_). ```bash pgrep process @@ -430,13 +433,13 @@ pkill -t pts/1 ### `killall` command -This command's function is roughly the same as that of the `pkill` command. The usage is —`killall [option] [ -s SIGNAL | -SIGNAL ] NAME`. The default signal is *SIGTERM*. +This command's function is roughly the same as that of the `pkill` command. The usage is —`killall [option] [ -s SIGNAL | -SIGNAL ] NAME`. The default signal is _SIGTERM_. -| Options | Description | -| :--- | :--- | -| `-l` | lists all known signal names | -| `-i` | asks for confirmation before killing | -| `-I` | case insensitive process name match | +| Options | Description | +| :------ | :----------------------------------- | +| `-l` | lists all known signal names | +| `-i` | asks for confirmation before killing | +| `-I` | case insensitive process name match | Example: @@ -448,12 +451,12 @@ killall tomcat This command displays the progress in a tree style, and its usage is - `pstree [option]`. -| Option | Description | -| :--- | :--- | -| `-p` | Displays the PID of the process | -| `-n` | sorts output by PID | -| `-h` | highlights the current process and its ancestors | -| `-u` | shows uid transitions | +| Option | Description | +| :----- | :----------------------------------------------- | +| `-p` | Displays the PID of the process | +| `-n` | sorts output by PID | +| `-h` | highlights the current process and its ancestors | +| `-u` | shows uid transitions | ```bash $ pstree -pnhu diff --git a/docs/books/admin_guide/09-backups.md b/docs/books/admin_guide/09-backups.md index d40092738e..87a26b81b3 100644 --- a/docs/books/admin_guide/09-backups.md +++ b/docs/books/admin_guide/09-backups.md @@ -1,9 +1,9 @@ --- title: Backup and Restore +author: Antoine Le Morvan +contributors: Steven Spencer, Ganna Zhyrnova --- -# Backup and Restore - In this chapter, you will learn how to back up and restore your data using Linux. **** @@ -211,15 +211,15 @@ $ tar cjf - /directory/to/backup/ | wc -c Here is an example of a naming convention for a `tar` backup, knowing that the date will be added to the name. -| keys | Files | Suffix | Functionality | -|---------|---------|------------------|----------------------------------------------| -| `cvf` | `home` | `home.tar` | `/home` in relative mode, uncompressed form | -| `cvfP` | `/etc` | `etc.A.tar` | `/etc` in absolute mode, no compression | -| `cvfz` | `usr` | `usr.tar.gz` | `/usr` in relative mode, *gzip* compression | -| `cvfj` | `usr` | `usr.tar.bz2` | `/usr` in relative mode, *bzip2* compression | +| keys | Files | Suffix | Functionality | +| ------- | ------- | ---------------- | --------------------------------------------- | +| `cvf` | `home` | `home.tar` | `/home` in relative mode, uncompressed form | +| `cvfP` | `/etc` | `etc.A.tar` | `/etc` in absolute mode, no compression | +| `cvfz` | `usr` | `usr.tar.gz` | `/usr` in relative mode, *gzip* compression | +| `cvfj` | `usr` | `usr.tar.bz2` | `/usr` in relative mode, *bzip2* compression | | `cvfPz` | `/home` | `home.A.tar.gz` | `/home` in absolute mode, *gzip* compression | | `cvfPj` | `/home` | `home.A.tar.bz2` | `/home` in absolute mode, *bzip2* compression | -| … | | | | +| … | | | | #### Create a backup @@ -279,7 +279,7 @@ tar cvzf backup.tar.gz dirname/ | Key | Description | |-----|----------------------------------| -| `z` |Compresses the backup in *gzip*. | +| `z` |Compresses the backup in *gzip*. | !!! Note @@ -299,7 +299,7 @@ tar cvfj backup.tar.bz2 dirname/ | Key | Description | |-----|-----------------------------------| -| `j` |Compresses the backup in *bzip2*. | +| `j` |Compresses the backup in *bzip2*. | !!! Note @@ -337,10 +337,10 @@ Adding a directory is similar. Here add `dirtoadd` to `backup_name.tar`: tar rvf backup_name.tar dirtoadd ``` -| Key | Description | -|-----|----------------------------------------------------------------------------------| -| `r` | Appends the files or directories to the end of the archive. | -| `A` | Appends all files in one archive to the end of another archive. | +| Key | Description | +|-----|-----------------------------------------------------------------| +| `r` | Appends the files or directories to the end of the archive. | +| `A` | Appends all files in one archive to the end of another archive. | !!! Note @@ -367,7 +367,7 @@ tar t[key(s)] [device] ``` | Key |Description | -|-----|-------------------------------------------------------| +|-----|------------------------------------------------------| | `t` |Displays the content of a backup (compressed or not). | Examples: @@ -467,8 +467,8 @@ tar xvfP /backups/etc.133.P.tar Once again, before performing extraction operations, you should always check the contents of the backup files (particularly those saved in absolute mode). -| Key |Description | -|------|----------------------------------------------------| +| Key | Description | +|------|---------------------------------------------------------| | `x` | Extracts files from backups (whether compressed or not) | Extracting a *tar-gzipped* (`*.tar.gz`) backup is done with the `xvfz` keys: @@ -534,7 +534,7 @@ tar xvf backup.tar --wildcards '*.conf' keys: -* __--wildcards *.conf__ corresponds to files with the extension `.conf`. +* **`--wildcards *.conf`** corresponds to files with the extension `.conf`. !!! tip "Expanded Knowledge" @@ -610,11 +610,11 @@ Here, the `find /etc` command returns a list of files corresponding to the conte Do not forget the `>` sign when saving or the `F save_name_cpio`. -| Options |Description | -|---------|------------------------------------------------| -| `-o` |Creates a backup through _cp-out_ mode. | -| `-v` |Displays the name of the processed files. | -| `-F` |Backup to specific media, which can replace standard input ("<") and standard output (">") in the `cpio` command | +| Options | Description | +|---------|------------------------------------------------------------------------------------------------------------------| +| `-o` | Creates a backup through *cp-out* mode. | +| `-v` | Displays the name of the processed files. | +| `-F` | Backup to specific media, which can replace standard input ("<") and standard output (">") in the `cpio` command | Backup to a media: @@ -658,10 +658,10 @@ find /etc/shadow | cpio -o -AF SystemFiles.A.cpio Adding files is only possible on direct access media. -| Option | Description | -|--------|---------------------------------------------| +| Option | Description | +|--------|--------------------------------------------------| | `-A` | Appends one or more files to an existing backup. | -| `-F` | Designates the backup to be modified. | +| `-F` | Designates the backup to be modified. | #### Compressing a backup @@ -701,7 +701,7 @@ Example: cpio -tv < /backups/etc.152.cpio | less ``` -| Options |Description | +| Options | Description | |---------|---------------------------| | `-t` | Reads a backup. | | `-v` | Displays file attributes. | @@ -726,7 +726,7 @@ cpio -iv < /backups/etc.152.cpio | less | Options | Description | |------------------------------|---------------------------------------------------------------------| -| `-i` | Restores a complete backup. | +| `-i` | Restores a complete backup. | | `-E file` | Restores only the files whose name is contained in file. | | `--make-directories` or `-d` | Rebuilds the missing tree structure. | | `-u` | Replaces all files even if they exist. | diff --git a/docs/books/admin_guide/10-boot.md b/docs/books/admin_guide/10-boot.md index da07d31c24..4696fec172 100644 --- a/docs/books/admin_guide/10-boot.md +++ b/docs/books/admin_guide/10-boot.md @@ -1,9 +1,9 @@ --- title: System Startup +author: Antoine Le Morvan +contributors: Steven Spencer, Ganna Zhyrnova --- -# System Startup - In this chapter, you will learn how the system starts. **** @@ -146,8 +146,8 @@ To password-protect the GRUB2 bootloader: Sometimes, you may see in some documents that the `grub2-set-password` (`grub2-setpassword`) command is used to protect the GRUB2 bootloader: -| command | Core functions | Configuration file modification method | automaticity | -|-------------------------|---------------------------------------|----------------------------------------|--------------| +| command | Core functions | Configuration file modification method | automaticity | +|-------------------------|----------------------------------------|----------------------------------------|--------------| | `grub2-set-password` | Sets password and update configuration | Auto Completion | high | | `grub2-mkpasswd-pbkdf2` | Only generates encrypted hash values | Requires manual editing | low | @@ -192,11 +192,11 @@ The development of `systemd` was to: `systemd` introduces the concept of unit files, also known as `systemd` units. -| Type | File extension | Functionality | +| Type | File extension | Functionality | |--------------|----------------|------------------------------------------| -| Service unit | `.service` | System service | -| Target unit | `.target` | A group of systemd units | -| Mount unit | `.automount` | An automatic mount point for file system | +| Service unit | `.service` | System service | +| Target unit | `.target` | A group of systemd units | +| Mount unit | `.automount` | An automatic mount point for file system | !!! Note @@ -222,15 +222,15 @@ Due to space limitations, this document will not provide a detailed introduction Service units end with the `.service` file extension and have a similar purpose to init scripts. The use of `systemctl` command is to `display`, `start`, `stop`, or `restart` a system service. Except for very few cases, the `systemctl` single line command can operate on one or more units in most cases (not limited to the unit type of ".service"). You can view it through the help system. -| systemctl | Description | -|-------------------------------------------|-----------------------------------------| -| systemctl start *name*.service ... | Start one or more services | -| systemctl stop *name*.service ... | Stop one or more services | -| systemctl restart *name*.service ... | Restart one or more services | -| systemctl reload *name*.service ... | Reload one or more services | -| systemctl status *name*.service ... | Check one or more services status | -| systemctl try-restart *name*.service ... | Restart one or more services (If they are running) | -| systemctl list-units --type service --all | Displays the status of all services | +| systemctl | Description | +|-------------------------------------------|----------------------------------------------------| +| systemctl start *name*.service ... | Start one or more services | +| systemctl stop *name*.service ... | Stop one or more services | +| systemctl restart *name*.service ... | Restart one or more services | +| systemctl reload *name*.service ... | Reload one or more services | +| systemctl status *name*.service ... | Check one or more services status | +| systemctl try-restart *name*.service ... | Restart one or more services (If they are running) | +| systemctl list-units --type service --all | Displays the status of all services | The `systemctl` command is also used for the `enable` or `disable` of a system service and displaying associated services: @@ -302,13 +302,13 @@ For example, the `graphical.target` unit that starts a graphical session starts `sysinit.target` and `basic.target` are checkpoints during the startup process. Although one of the design goals of `systemd` is to start system services in parallel, it is necessary to start the "targets" of certain services and features before starting other services and "targets". Any error in `sysinit.target` or `basic target` will cause the initialization of `systemd` to fail. At this time, your terminal may have entered "emergency mode" (`emergency.target`). -| Target Units | Description | -|-------------------|-----------------------------------------------------------| -| poweroff.target | Shuts down the system and turns it off | -| rescue.target | Activates a rescue shell | +| Target Units | Description | +|-------------------|-------------------------------------------------------------| +| poweroff.target | Shuts down the system and turns it off | +| rescue.target | Activates a rescue shell | | multi-user.target | Activates a multi-user system without a graphical interface | | graphical.target | Activates a multi-user system with a graphical interface | -| reboot.target | Shuts down and restarts the system | +| reboot.target | Shuts down and restarts the system | #### The default target @@ -395,14 +395,14 @@ systemctl emergency The `systemctl` command replaces many power management commands used in previous versions: -|Old command | New command | Description | -|---------------------|--------------------------|------------------------| -| `halt` | `systemctl halt` |Shuts down the system. | -| `poweroff` | `systemctl poweroff` |Turns off the system. | -| `reboot` | `systemctl reboot` |Restarts the system. | -| `pm-suspend` | `systemctl suspend` |Suspends the system. | -| `pm-hibernate` | `systemctl hibernate` |Hibernates the system. | -| `pm-suspend-hybrid` | `systemctl hybrid-sleep` |Hibernates and suspends the system.| +|Old command | New command | Description | +|---------------------|--------------------------|------------------------------------| +| `halt` | `systemctl halt` |Shuts down the system. | +| `poweroff` | `systemctl poweroff` |Turns off the system. | +| `reboot` | `systemctl reboot` |Restarts the system. | +| `pm-suspend` | `systemctl suspend` |Suspends the system. | +| `pm-hibernate` | `systemctl hibernate` |Hibernates the system. | +| `pm-suspend-hybrid` | `systemctl hybrid-sleep` |Hibernates and suspends the system. | ### The `journald` process diff --git a/docs/books/admin_guide/11-tasks.md b/docs/books/admin_guide/11-tasks.md index cece961cb3..bddd1950e0 100644 --- a/docs/books/admin_guide/11-tasks.md +++ b/docs/books/admin_guide/11-tasks.md @@ -1,9 +1,9 @@ --- title: Task Management +author: Antoine Le Morvan +contributors: Steven Spencer, Ganna Zhyrnova --- -# Task Management - In this chapter, you will learn how to manage scheduled tasks. **** @@ -143,12 +143,12 @@ Example: [root]# crontab -u user1 -e ``` -| Option |Description | -|--------|-----------------------------------------------------------| -| `-e` | Edits the schedule file with vi | -| `-l` | Displays the contents of the schedule file | -| `-u ` | Specify a single user to operate | -| `-r` | Deletes the schedule file | +| Option | Description | +|-------------|--------------------------------------------| +| `-e` | Edits the schedule file with vi | +| `-l` | Displays the contents of the schedule file | +| `-u ` | Specify a single user to operate | +| `-r` | Deletes the schedule file | !!! Warning @@ -206,12 +206,12 @@ The `crontab` file is structured according to the following rules. To simplify the notation for the definition of time, it is advisable to use special symbols. -| Special symbol | Description | -|---------------|----------------------------------| -| `*` | Indicates all the time values of the field | -| `-` | Indicates a continuous time range | -| `,` | Indicates the discontinuous time range | -| `/` | Indicates time interval | +| Special symbol | Description | +|----------------|--------------------------------------------| +| `*` | Indicates all the time values of the field | +| `-` | Indicates a continuous time range | +| `,` | Indicates the discontinuous time range | +| `/` | Indicates time interval | Examples: @@ -241,14 +241,14 @@ Run every 10 minutes during working hours on weekdays: For the root user, `crontab` also has some special time settings: -| Setting | Description | -|----------|-------------------------------| -| @reboot | Runs a command on system reboot | -| @hourly | Runs a command every hour | -| @daily | Runs daily just after midnight| -| @weekly | Runs command every Sunday just after midnight | -| @monthly | Runs command on the first day of the month just after midnight | -| @annually| Runs January 1st just after midnight | +| Setting | Description | +|-----------|----------------------------------------------------------------| +| @reboot | Runs a command on system reboot | +| @hourly | Runs a command every hour | +| @daily | Runs daily just after midnight | +| @weekly | Runs command every Sunday just after midnight | +| @monthly | Runs command on the first day of the month just after midnight | +| @annually | Runs January 1st just after midnight | ### Task execution process diff --git a/docs/books/admin_guide/12-network.md b/docs/books/admin_guide/12-network.md index 4f25e6ceb3..aaf7057857 100644 --- a/docs/books/admin_guide/12-network.md +++ b/docs/books/admin_guide/12-network.md @@ -1,9 +1,9 @@ --- title: Implementing the Network +author: Antoine Le Morvan +contributors: Steven Spencer, Ganna Zhyrnova --- -# Implementing the Network - In this chapter, you will learn how to work with and manage the network. **** @@ -56,7 +56,7 @@ IP addresses are used for the proper routing of messages (packets). They are div * network bits - The part associated with consecutive "1s" in the binary subnet mask * host bits - The part associated with consecutive "0s" in the binary subnet mask -``` +```bash |<- host bits ->| |<-- network bits -->| 192.168.1.10 ==> 11000000.10101000.00000001.00001010 @@ -68,7 +68,7 @@ The subnet mask defines the network and host bits of an IP address. By using the * the network address (**NetID** or **SubnetID**) by performing a bitwise logical AND between the IP address and the mask; * the host address (**HostID**) by performing a bitwise logical AND between the IP address and the complement of the mask. -``` +```bash 192.168.1.10 ==> 11000000.10101000.00000001.00001010 255.255.255.0 ==> 11111111.11111111.11111111.00000000 @@ -81,7 +81,7 @@ HostID 00000000.00000000.00000000.00001010 **Legitimate subnet mask** - In order from left to right, consecutive 1s can be defined as valid subnet masks. -``` +```bash legitimate 11111111.11111111.11111111.00000000 illegitimate 11001001.11111111.11111111.00000000 @@ -95,7 +95,7 @@ There are also specific addresses within a network, which must be identified. Th * The first address of a range is the **network address**. It is used to identify networks and route information between them. This address can be obtained through Logic and Operations. - ``` + ```bash 192.168.1.10 ==> 11000000.10101000.00000001.00001010 255.255.255.0 ==> 11111111.11111111.11111111.00000000 @@ -107,7 +107,7 @@ There are also specific addresses within a network, which must be identified. Th * The last address of a range is the **broadcast address**. It is used to broadcast information to all the machines on the network. Keep the network bits unchanged and replace all host bits with 1 to obtain this address. - ``` + ```bash 192.168.1.10 ==> 11000000.10101000.00000001.00001010 255.255.255.0 ==> 11111111.11111111.11111111.00000000 @@ -179,7 +179,7 @@ As mentioned earlier, subnet masks divide IPv4 addresses into two parts: network For example **2001:0db8:130F:0000:0000:09C0:876A:130B/64**: -``` +```bash Network prefix |<- 64 bits ->| @@ -200,7 +200,7 @@ IPv4 packets contain both header and data parts: **IHL**: A field used to control the length of the header. When the "Options" field is not included, the minimum value is 5 (namely, binary 0101). At this time, the head occupies 20 bytes. The maximum value is 15 (namely, binary 1111), and the header is 60 bytes long. -``` +```bash The actual length of the IPv4 header = The value of the IHL field * 4 ``` @@ -208,7 +208,7 @@ The actual length of the IPv4 header = The value of the IHL field * 4 **Total Length**: Represents the total length of the entire IPv4 datagram (IPv4 packet) in bytes. -!!! note +!!! note An IP packet and an IP datagram are technically distinct terms for the same concept: data units transmitted at the network layer. @@ -258,7 +258,7 @@ The fixed length of the Basic header is 40 bytes and it is fixed to 8 fields: **Flow Label**: This IPv6 new field is used to control packet flow. A non-zero value in this field indicates that the packet should be treated specially; i.e., it should not be routed through different paths to reach the destination, but instead use the same path. An advantage of this is that the receiving end doesn’t have to reorder the package, thereby speeding up the process. This field helps prevent data packet reordering and is specifically designed for streaming media/live media. -**Payload Length**: Indicate the size of the payload. This field can only represent a Payload with a maximum length of 65535 bytes. In case the length of the payload is greater than 65535 bytes, then the payload length field will be set to 0 and the jumbo payload option is used in the Hop-by-Hop Options extension header. +**Payload Length**: Indicate the size of the payload. This field can only represent a Payload with a maximum length of 65535 bytes. In case the length of the payload is greater than 65535 bytes, then the payload length field will be set to 0 and the jumbo payload option is used in the Hop-by-Hop Options extension header. **Next header**: Used to indicate the type of packet header after the basic header. If there is a first extension header, it represents the type of the first extension header. Otherwise, it represents the protocol type used by the upper layer, such as 6 (TCP) and 17 (UDP). @@ -272,9 +272,9 @@ The fixed length of the Basic header is 40 bytes and it is fixed to 8 fields: In IPv4 datagrams, the IPv4 header contains optional fields such as Options, which include Security, Timestamp, Record Route, etc. These Options can increase the IPv4 header length from 20 to 60 bytes. During forwarding, handling IPv4 datagrams carrying these Options can consume significant device resources, so they are rarely used in practice. -IPv6 removes these Options from the IPv6 basic header and places them in the extension header, which is placed between the IPv6 Basic header and the Upper Layer Protocol Data Unit. +IPv6 removes these Options from the IPv6 basic header and places them in the extension header, which is placed between the IPv6 Basic header and the Upper Layer Protocol Data Unit. -An IPv6 packet can contain 0, 1, or multiple extension headers, which are only added by the sender when the device or destination node requires special processing. +An IPv6 packet can contain 0, 1, or multiple extension headers, which are only added by the sender when the device or destination node requires special processing. Unlike the IPv4 Options field (which can be extended up to 40 bytes and requires continuous storage), the IPv6 extension header adopts a chain structure and has no fixed length limit, making it more scalable in the future. Its 8 byte alignment mechanism is implemented through the Next header field, which ensures processing efficiency and avoids fragmentation overhead. @@ -470,11 +470,11 @@ Display the ARP table: The mtr command is introduced in detail in [this document](../../gemstones/network/mtr.md) -### `ss` command +### `ss` command This command replaces the old `netstat` and is mainly used to view the status of ports and sockets. Its usage is: -``` +```bash ss [OPTIONS] [FILTER] ``` @@ -536,7 +536,7 @@ If you need to know the correspondence between default ports and services, pleas Frequently use the `ethtool` command to view the properties of NIC (Network Interface Card). Its usage is: -``` +```bash ethtool [option] DEVNAME ``` @@ -642,14 +642,14 @@ HOSTNAME=localhost [root]# ipcalc –b 172.16.66.203 255.255.240.0 >> /etc/sysconfig/network-scripts/ifcfg-eth0 ``` -| Option | Description | -| :---: | :---: | -| `-b` or `--broadcast ` | Displays the broadcast address. | -| `-n` or `--network` | Displays network address | -| `-p` or `--prefix` | Displays network prefix | -| `-m` or `--netmask` | Displays netmask for IP | -| `-s` or`--silent` | Does not display any error messages | -| `-h` or `--hostname` | Shows hostname determined via DNS | +| Option | Description | +| :---: | :---: | +| `-b` or `--broadcast` | Displays the broadcast address. | +| `-n` or `--network` | Displays network address | +| `-p` or `--prefix` | Displays network prefix | +| `-m` or `--netmask` | Displays netmask for IP | +| `-s` or`--silent` | Does not display any error messages | +| `-h` or `--hostname` | Shows hostname determined via DNS | ## Content related to the hostname @@ -659,7 +659,7 @@ systemd is not just an initialization program; it is a large software suite that The `hostnamectl` command is an alternative to `hostname`. It should be noted that the modifications made by the `hostnamectl` command are **permanent**. Its usage is: -``` +```bash hostnamectl [OPTIONS...] COMMAND ... ``` @@ -738,7 +738,7 @@ Each line represents a single mapping relationship. The content of this file can Example of **/etc/hosts** file: -``` +```bash 127.0.0.1 localhost localhost.localdomain ::1 localhost localhost.localdomain 192.168.1.10 rockstar.rockylinux.lan rockstar @@ -750,13 +750,13 @@ When a user types www.rockylinux.org in a browser, this happens: 1. **Local resolution stage** -> 1. Search browser cache (DNS cache). If the corresponding mapping record is found, the query ends. If not found, the next step will be executed +> 1. Search browser cache (DNS cache). If the corresponding mapping record is found, the query ends. If not found, the next step will be executed > 2. Search for the local Hosts file (/etc/hosts). If there is a corresponding mapping record, the query ends. Otherwise, proceed to the next step 2. **Recursive query stage** > 1. Initiate a query request to the DNS server configured in /etc/resolv.conf (such as 8.8.8.8). The DNS server (s) users configure in the operating system are also known as the Local DNS server(s). The Local DNS server(s) here refer to public DNS provided for public use, such as 8.8.8.8 and 114.114.114. If the query request hits the cache record of the Local DNS server, the request ends and returns the result; otherwise, it enters the iterative query process -> 2. The local DNS server initiates a request to the Root Name Server and obtains the address of the .org domain. +> 2. The local DNS server initiates a request to the Root Name Server and obtains the address of the .org domain. > 3. The top-level domain (TLD) server will query the address of rockylinux.org from the .org server > 4. The Name Server ‌finally gets the exact IP address of www.rockylinux.org from the rockylinux.org server @@ -863,7 +863,7 @@ hosts: files dns myhostname The basic syntax for each line is: -``` +```bash : [Action1] [Action2] ... ↑ ↑ ↑ required required optional @@ -885,7 +885,7 @@ The `getent` (get entry) command gets an NSSwitch entry (`hosts` + `dns`) Syntax of the `getent` command: -``` +```bash getent [OPTION...] database [key ...] ``` @@ -896,7 +896,7 @@ Example: 76.223.126.88 rockylinux.org ``` -Solely querying a Local DNS server may yield incorrect resolution results by failing to account for **/etc/hosts** file entries, though this is uncommon in modern systems. +Solely querying a Local DNS server may yield incorrect resolution results by failing to account for **/etc/hosts** file entries, though this is uncommon in modern systems. For proper **/etc/hosts** file resolution, query the NSSwitch name service which handles DNS resolution. @@ -914,7 +914,7 @@ Please refer to the contents of `man 5 nm-settings` and `man 5 NetworkManager.co You can use the `mtr` or `ping` command to gradually check the communication status of the network. The objects of inspection are: -1. TCP/IP software layer. For example `mtr -c 4 localhost` or `ping -c 4 localhost`. +1. TCP/IP software layer. For example `mtr -c 4 localhost` or `ping -c 4 localhost`. 2. NIC (Network Interface Card). For example `mtr 192.168.100.20` or `ping 192.168.100.20` 3. Gateway. For example `mtr 192.168.100.1` or `ping 192.168.100.1` 4. Remote servers for wide area networks. For example `mtr 151.101.42.132` or `ping 151.101.42.132` @@ -944,7 +944,7 @@ dnf install arp-scan Usage is -``` +```bash arp-scan [options] [hosts...] ``` @@ -975,7 +975,6 @@ Common options for the `arp-scan` command: | `-g` | Doesn't display duplicate packets | | `-t timeout` | Sets the timeout time (in milliseconds) for each host, with a default value of 500 | - !!! Tip As the above example shows, MAC address conflicts are possible! Virtualization technologies and the copying of virtual machines cause these problems. diff --git a/docs/books/admin_guide/13-softwares.md b/docs/books/admin_guide/13-softwares.md index 392939cef7..04ea545cd5 100644 --- a/docs/books/admin_guide/13-softwares.md +++ b/docs/books/admin_guide/13-softwares.md @@ -9,8 +9,6 @@ tags: - software management --- -# Software Management - ## Generalities On a Linux system, it is possible to install software in two ways: @@ -477,7 +475,7 @@ Each Application Stream has a different lifecycle. Please refer to the following * https://access.redhat.com/support/policy/updates/rhel-app-streams-life-cycle#rhel9_application_streams * https://access.redhat.com/support/policy/updates/rhel-app-streams-life-cycle#rhel10_dependent_application_streams -In this document, the author mainly explains the Application Streams of modular architecture. +In this document, the author mainly explains the Application Streams of modular architecture. ### Module Streams @@ -486,7 +484,7 @@ Important note: * To use modular architecture Application Streams in RL 8.x and RL 9.x, you need to enable the **AppStream** repository first. In the Appstream repository, **modules** represent collections of software packages for logical units that are built, tested, and published together. A single module can contain multiple streams (versions) of the same application. * Each module receives updates separately. * After enabling a single module, users can only use one stream (version) of that module. -* Each module can have its own default stream (default version) marked with "[d]". +* Each module can have its own default stream (default version) marked with "[d]". * The default stream is active unless you disable the module or enable another stream for the module. ### Module Profiles diff --git a/docs/books/admin_guide/14-special-authority.md b/docs/books/admin_guide/14-special-authority.md index 3a6bce57db..09df7a79de 100644 --- a/docs/books/admin_guide/14-special-authority.md +++ b/docs/books/admin_guide/14-special-authority.md @@ -723,4 +723,3 @@ Due to various reasons during the initial design of sudo (such as complex design * ‌CVE-2025-32463 You can use the Rust version of sudo as an alternative. For more details, see [here](https://github.com/trifectatechfoundation/sudo-rs). - diff --git a/docs/books/admin_guide/17-log.md b/docs/books/admin_guide/17-log.md index 302e17c93a..b26930e508 100644 --- a/docs/books/admin_guide/17-log.md +++ b/docs/books/admin_guide/17-log.md @@ -66,14 +66,14 @@ After decades of development, `rsyslog` currently supports three different confi 1. basic (sysklogd) - This format is suitable for representing the basic configuration in a single line. - ``` + ```bash mail.info /var/log/mail.log mail.err @@server.example.net ``` 2. advanced (RainerScript) - Highly flexible and accurate configuration format. - ``` + ```bash mail.err action(type="omfwd" protocol="tcp" queue.type="linkedList") ``` diff --git a/docs/books/index.md b/docs/books/index.md index c2ab05ebb0..fcc5e65f2f 100644 --- a/docs/books/index.md +++ b/docs/books/index.md @@ -1,11 +1,9 @@ --- -title: Books Home +title: Rocky Linux Instructional Books author: Steven Spencer -contributors: @fromoz, Ganna Zhyrnova +contributors: @fromoz, Ganna Zhyrnova, Antoine Le Morvan --- -# Rocky Linux Instructional Books - You have found the **Books** section of the documentation. This is where longer-form documentation is kept. These documents are broken down into sections or **_chapters_** to make it easy for you to work through them at your own pace and keeping track of your progress. These documents were created by people just like you, with a passion for certain subjects. Would you like to try your hand at writing an addition to this section? If so, That would be GREAT! Simply join the conversation on the [Mattermost Documentation channel](https://chat.rockylinux.org/rocky-linux/channels/documentation) and we will help you on your way. @@ -54,9 +52,10 @@ Our books can be downloaded in PDF format for offline reading. * [English](https://rocky-linux.github.io/documentation/RockyLinuxMiddlewaresGuide.pdf) * [Italian](https://rocky-linux.github.io/documentation/RockyLinuxMiddlewaresGuide.it.pdf) -### Rocky Linux Web Services (LAMP or LEMP) +### Rocky Linux Web Services (LAMP or LEMP) * [English](https://rocky-linux.github.io/documentation/RockyLinuxWebServicesGuide.pdf) + ### Learning RSync * [English](https://rocky-linux.github.io/documentation/learning_rsync_rocky_linux.pdf) diff --git a/docs/books/learning_ansible/00-toc.md b/docs/books/learning_ansible/00-toc.md index a00c608264..816b7aa8b8 100644 --- a/docs/books/learning_ansible/00-toc.md +++ b/docs/books/learning_ansible/00-toc.md @@ -1,5 +1,7 @@ --- title: Learning Ansible with Rocky +author: Antoine Le Morvan +contributors: Steven Spencer --- # Learning Ansible with Rocky diff --git a/docs/books/learning_ansible/02-advanced.md b/docs/books/learning_ansible/02-advanced.md index e01931265b..64db43b7b8 100644 --- a/docs/books/learning_ansible/02-advanced.md +++ b/docs/books/learning_ansible/02-advanced.md @@ -1,5 +1,7 @@ --- title: Ansible Intermediate +author: Antoine Le Morvan +contributors: Steven Spencer --- # Ansible Intermediate @@ -152,7 +154,7 @@ Use of a stored variable: The strings that make up the stored variable can be accessed via the `stdout` value (which allows you to do things like `homes.stdout.find("core") != -1`), to exploit them using a loop (see `loop`), or simply by their indices as seen in the previous example. -### Exercises: +### Exercises * Write a playbook, `play-vars.yml,` using global variables that print the target's distribution name and major version. @@ -350,7 +352,7 @@ You will probably have to test that a variable exists to avoid execution errors: when: myboolean is defined and myboolean ``` -### Exercises: +### Exercises * Print the value of `service.web` only when `type` equals to `web`. diff --git a/docs/books/learning_ansible/03-working-with-files.md b/docs/books/learning_ansible/03-working-with-files.md index 93a45a981a..8f288983d9 100644 --- a/docs/books/learning_ansible/03-working-with-files.md +++ b/docs/books/learning_ansible/03-working-with-files.md @@ -1,5 +1,7 @@ --- title: File Management +author: Antoine Le Morvan +contributors: Steven Spencer --- # Ansible - Management of Files diff --git a/docs/books/learning_ansible/04-ansible-galaxy.md b/docs/books/learning_ansible/04-ansible-galaxy.md index 2532cb99a5..31f4e8df0b 100644 --- a/docs/books/learning_ansible/04-ansible-galaxy.md +++ b/docs/books/learning_ansible/04-ansible-galaxy.md @@ -1,5 +1,7 @@ --- title: Ansible Galaxy +author: Antoine Le Morvan +contributors: Steven Spencer --- # Ansible Galaxy: Collections and Roles diff --git a/docs/books/learning_ansible/05-deployments.md b/docs/books/learning_ansible/05-deployments.md index 94775439dd..e800705747 100644 --- a/docs/books/learning_ansible/05-deployments.md +++ b/docs/books/learning_ansible/05-deployments.md @@ -1,5 +1,7 @@ --- title: Deploy With Ansistrano +author: Antoine Le Morvan +contributors: Steven Spencer --- # Ansible Deployments with Ansistrano diff --git a/docs/books/learning_ansible/06-large-scale-infrastructure.md b/docs/books/learning_ansible/06-large-scale-infrastructure.md index 9da0f7024a..4e743127dc 100644 --- a/docs/books/learning_ansible/06-large-scale-infrastructure.md +++ b/docs/books/learning_ansible/06-large-scale-infrastructure.md @@ -1,5 +1,7 @@ --- title: Large Scale infrastructure +author: Antoine Le Morvan +contributors: Steven Spencer --- # Ansible - Large Scale infrastructure diff --git a/docs/books/learning_bash/00-toc.md b/docs/books/learning_bash/00-toc.md index 0624a1274a..a42bb4d233 100644 --- a/docs/books/learning_bash/00-toc.md +++ b/docs/books/learning_bash/00-toc.md @@ -9,8 +9,6 @@ tags: - bash --- -# Learning Bash with Rocky - In this section, you will learn more about Bash scripting, an exercise that every administrator will have to perform one day or another. ## Generalities diff --git a/docs/books/learning_bash/01-first-script.md b/docs/books/learning_bash/01-first-script.md index 6527f8642f..57e93620b9 100644 --- a/docs/books/learning_bash/01-first-script.md +++ b/docs/books/learning_bash/01-first-script.md @@ -9,8 +9,6 @@ tags: - bash --- -# Bash - First script - In this chapter you will learn how to write your first script in bash. **** diff --git a/docs/books/learning_bash/02-using-variables.md b/docs/books/learning_bash/02-using-variables.md index 7387cc19ba..7511e314a2 100644 --- a/docs/books/learning_bash/02-using-variables.md +++ b/docs/books/learning_bash/02-using-variables.md @@ -9,8 +9,6 @@ tags: - bash --- -# Bash - Using Variables - In this chapter you will learn how to use variables in your bash scripts. **** @@ -165,15 +163,15 @@ The `set` command displays all used system variables. Among the dozens of environment variables, several are of interest to be used in a shell script: -| Variables | Description | -|----------------------------------|-----------------------------------------------------------| -| `HOSTNAME` | Host name of the machine. | -| `USER`, `USERNAME` and `LOGNAME` | Name of the user connected to the session. | -| `PATH` | Path to find the commands. | +| Variables | Description | +|----------------------------------|------------------------------------------------------------------| +| `HOSTNAME` | Host name of the machine. | +| `USER`, `USERNAME` and `LOGNAME` | Name of the user connected to the session. | +| `PATH` | Path to find the commands. | | `PWD` | Current directory, updated each time the cd command is executed. | -| `HOME` | Login directory. | -| `$$` | Process id of the script execution. | -| `$?` | Return code of the last command executed. | +| `HOME` | Login directory. | +| `$$` | Process id of the script execution. | +| `$?` | Return code of the last command executed. | The `export` command allows you to export a variable. diff --git a/docs/books/learning_bash/03-data-entry-and-manipulations.md b/docs/books/learning_bash/03-data-entry-and-manipulations.md index 77f00f7f3e..378bcbde36 100644 --- a/docs/books/learning_bash/03-data-entry-and-manipulations.md +++ b/docs/books/learning_bash/03-data-entry-and-manipulations.md @@ -9,8 +9,6 @@ tags: - bash --- -# Bash - Data entry and manipulations - In this chapter you will learn how to make your scripts interact with users and manipulate the data. **** @@ -50,11 +48,11 @@ read name firstname read -p "Please type your name: " name ``` -| Option | Functionality | -|--------|-----------------------------------------------| -| `-p` | Displays a prompt message. | +| Option | Functionality | +|--------|------------------------------------------------| +| `-p` | Displays a prompt message. | | `-n` | Limits the number of characters to be entered. | -| `-s` | Hides the input. | +| `-s` | Hides the input. | When using the `-n` option, the shell automatically validates the input after the specified number of characters. The user does not have to press the ++enter++ key. diff --git a/docs/books/learning_bash/04-check-your-knowledge.md b/docs/books/learning_bash/04-check-your-knowledge.md index be0177e45c..b7ed466cce 100644 --- a/docs/books/learning_bash/04-check-your-knowledge.md +++ b/docs/books/learning_bash/04-check-your-knowledge.md @@ -9,8 +9,6 @@ tags: - bash --- -# Bash - Check your knowledge - :heavy_check_mark: Among these 4 shells, which one does not exist: - [ ] Bash diff --git a/docs/books/learning_bash/05-tests.md b/docs/books/learning_bash/05-tests.md index e3f470d225..470c276339 100644 --- a/docs/books/learning_bash/05-tests.md +++ b/docs/books/learning_bash/05-tests.md @@ -9,8 +9,6 @@ tags: - bash --- -# Bash - Tests - **** **Objectives**: In this chapter you will learn how to: diff --git a/docs/books/learning_bash/07-loops.md b/docs/books/learning_bash/07-loops.md index dec2a79df3..91159c5b49 100644 --- a/docs/books/learning_bash/07-loops.md +++ b/docs/books/learning_bash/07-loops.md @@ -9,8 +9,6 @@ tags: - bash --- -# Bash - Loops - **** **Objectives**: In this chapter you will learn how to: diff --git a/docs/books/learning_bash/appendix/02-variables-logs.md b/docs/books/learning_bash/appendix/02-variables-logs.md index a168f63cb8..10316d281d 100644 --- a/docs/books/learning_bash/appendix/02-variables-logs.md +++ b/docs/books/learning_bash/appendix/02-variables-logs.md @@ -19,8 +19,7 @@ In lesson two, "Bash - Using Variables", you've seen some ways to use variables When a system administrator has to deal with log files, there are sometimes different formats that come into play. Let's say that you want to get some information out of the `dnf.log` (`/var/log/dnf.log`). Let's take a quick look at what that log file looks like using `tail /var/log/dnf.log`: - -``` +```bash 2022-05-04T09:02:18-0400 DEBUG extras: using metadata from Thu 28 Apr 2022 04:25:35 PM EDT. 2022-05-04T09:02:18-0400 DEBUG repo: using cache for: powertools 2022-05-04T09:02:18-0400 DEBUG powertools: using metadata from Thu 28 Apr 2022 04:25:36 PM EDT. @@ -35,7 +34,7 @@ When a system administrator has to deal with log files, there are sometimes diff Now take a look at the `messages` log file `tail /var/log/messages`: -``` +```bash May 4 08:47:19 localhost systemd[1]: Starting dnf makecache... May 4 08:47:19 localhost dnf[108937]: Metadata cache refreshed recently. May 4 08:47:19 localhost systemd[1]: dnf-makecache.service: Succeeded. @@ -50,7 +49,7 @@ May 4 08:52:09 localhost systemd[1]: NetworkManager-dispatcher.service: Succeed And finally let's take a look at the output of the `date` command: -``` +```bash Wed May 4 09:47:00 EDT 2022 ``` @@ -62,7 +61,7 @@ What we can see here is that the two log files, `dnf.log` and `messages` display To accomplish what we want, we are going to use a variable in our script called "today" that will format the date according to the date displayed in the `dnf.log`. To get the correct `date` format, we are using the `+%F` which will get us the yyyy-mm-dd format we are looking for. Since all we are concerned with is the day, not the times or any other information, that's all we will need to get the correct information out of the `dnf.log`. Try just this much of the script: -``` +```bash #!/usr/bin/env bash # script to grab dnf.log data and send it to administrator daily @@ -72,13 +71,13 @@ echo $today Here we are using the `echo` command to see if we have been successful with our date formatting. When you run the script, you should get an output with today's date that looks something like this: -``` +```bash 2022-05-04 ``` If so then great, we can remove our "debug" line and continue. Let's add another variable called "logfile" that we will set to `/var/log/dnf.log` and then let's see if we can `grep` that using our "today" variable. For now, let's just let it run to standard output: -``` +```bash !/usr/bin/env bash # script to grab dnf.log data and send it to administrator daily @@ -99,7 +98,7 @@ The `dnf.log` has a lot of information in it every day, so we are not posting th systemctl enable --now postfix ``` -``` +```bash #!/usr/bin/env bash # script to grab dnf.log data and send it to administrator daily @@ -109,7 +108,7 @@ logfile=/var/log/dnf.log /bin/grep $today $logfile | /bin/mail -s "DNF logfile data for $today" systemadministrator@domain.ext ``` -Let's take a look at the additions to the script here. We've added a pipe `|` to redirect output to `/bin/mail` set the subject of the email (`-s`) with what is in double quotes and set the recipient to be "systemadministrator@domain.ext". Replace that last bit with your email address and then try running the script again. +Let's take a look at the additions to the script here. We've added a pipe `|` to redirect output to `/bin/mail` set the subject of the email (`-s`) with what is in double quotes and set the recipient to be "". Replace that last bit with your email address and then try running the script again. As noted, you probably won't get the email without some changes to your Postfix mail setup, but you should see the attempt in `/var/log/maillog`. diff --git a/docs/books/licence.md b/docs/books/licence.md index d0a920f625..51805a5154 100644 --- a/docs/books/licence.md +++ b/docs/books/licence.md @@ -8,7 +8,7 @@ RockyLinux materials are published under Creative Commons-BY-SA. This means you **SA** : **Share Alike**. -- Creative Commons-BY-SA licence : https://creativecommons.org/licenses/by-sa/4.0/ +- Creative Commons-BY-SA licence : [https://creativecommons.org/licenses/by-sa/4.0/](Rocky Linux Instructional Books) The documents and their sources are freely downloadable from: @@ -17,7 +17,7 @@ The documents and their sources are freely downloadable from: Our media sources are hosted at github.com. You'll find the source code repository where the version of this document was created. -From these sources, you can generate your own personalized training material using [mkdocs](https://www.mkdocs.org/). You will find instructions for generating your document [here](https://github.com/rocky-linux/documentation/tree/main/build_pdf). +From these sources, you can generate your own personalized training material using [mkdocs](https://www.mkdocs.org/). You will find instructions for generating your document [in this directory](https://github.com/rocky-linux/documentation/tree/main/build_pdf). > How can I contribute to the documentation project? diff --git a/docs/books/web_services/00-toc.md b/docs/books/web_services/00-toc.md index d87d2c1a01..b70c823fdf 100644 --- a/docs/books/web_services/00-toc.md +++ b/docs/books/web_services/00-toc.md @@ -6,7 +6,6 @@ tags: - web - services --- - Rocky Linux is part of the Enterprise Linux family, making it particularly well suited to hosting web services such as file servers (FTP, sFTP), web servers (apache, nginx), application servers (PHP, Python), database servers (MariaDB, MySQL, PostgreSQL) or more specific services such as load balancing, caching, proxy or reverse proxy (HAProxy, Varnish, Squid). diff --git a/docs/books/web_services/022-web-servers-nginx.md b/docs/books/web_services/022-web-servers-nginx.md index 6e83b45bd4..d2ee861c97 100644 --- a/docs/books/web_services/022-web-servers-nginx.md +++ b/docs/books/web_services/022-web-servers-nginx.md @@ -123,25 +123,25 @@ http { Default configuration guidelines: -| Directive | Description | -|-----------------------------|-------------| -| `user` | Defines the process owner `user` and `group`. If the group is not specified, the group with the same name as the user is used. | -| `worker_processes` | Defines the number of processes. The optimum value depends on many factors, such as the number of CPU cores and hard disk specifications. In case of doubt, the Nginx documentation suggests a starting value equivalent to the number of CPU cores available (the auto value will try to determine this). | -| `pid` | Defines a file to store the PID value. | -| `worker_connections` | Sets the maximum number of simultaneous connections a worker process can open (to the client and mandated servers). | -| `tcp_nopush` | `tcp_nopush` is inseparable from the sendfile option. It is used to optimize the quantity of information sent simultaneously. Packets are only sent when they have reached their maximum size. | -| `tcp_nodelay` | Activating `tcp_nodelay` forces data in the socket to be sent immediately, regardless of packet size, which is the opposite of what `tcp_nopush` does. | +| Directive | Description | +|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `user` | Defines the process owner `user` and `group`. If the group is not specified, the group with the same name as the user is used. | +| `worker_processes` | Defines the number of processes. The optimum value depends on many factors, such as the number of CPU cores and hard disk specifications. In case of doubt, the Nginx documentation suggests a starting value equivalent to the number of CPU cores available (the auto value will try to determine this). | +| `pid` | Defines a file to store the PID value. | +| `worker_connections` | Sets the maximum number of simultaneous connections a worker process can open (to the client and mandated servers). | +| `tcp_nopush` | `tcp_nopush` is inseparable from the sendfile option. It is used to optimize the quantity of information sent simultaneously. Packets are only sent when they have reached their maximum size. | +| `tcp_nodelay` | Activating `tcp_nodelay` forces data in the socket to be sent immediately, regardless of packet size, which is the opposite of what `tcp_nopush` does. | | `sendfile` | Optimizes the sending of static files (this option is not required for a proxy-inverse configuration). If sendfile is enabled, Nginx ensures that all packets are completed before they are sent to the client (thanks to `tcp_nopush`). When the last packet arrives, Nginx disables `tcp_nopush` and forces data to be sent using `tcp_nodelay`. | -| `keepalive_timeout` | The maximum time before closing an inactive connection. | -| `types_hash_max_size` | Nginx maintains hash tables containing static information. Set the maximum size of the hash table. | -| `include` | Includes another file or files that match the template provided in the configuration. | -| `default_type` | Default MIME type of a request. | -| `ssl_protocols` | Accepted TLS protocol versions. | -| `ssl_prefer_server_ciphers` | Prefers server cipher suite to client cipher suite. | -| `access_log` | Configures access logs (see “log management” paragraph). | -| `error_log` | Configures error logs (see “log management” paragraph). | -| `gzip` | The ngx_http_gzip_module is a filter that compresses data transmitted in gzip format. | -| `gzip_disable` | Disables gzip based on a regular expression. | +| `keepalive_timeout` | The maximum time before closing an inactive connection. | +| `types_hash_max_size` | Nginx maintains hash tables containing static information. Set the maximum size of the hash table. | +| `include` | Includes another file or files that match the template provided in the configuration. | +| `default_type` | Default MIME type of a request. | +| `ssl_protocols` | Accepted TLS protocol versions. | +| `ssl_prefer_server_ciphers` | Prefers server cipher suite to client cipher suite. | +| `access_log` | Configures access logs (see “log management” paragraph). | +| `error_log` | Configures error logs (see “log management” paragraph). | +| `gzip` | The ngx_http_gzip_module is a filter that compresses data transmitted in gzip format. | +| `gzip_disable` | Disables gzip based on a regular expression. | The structure of the Nginx configuration is: diff --git a/docs/books/web_services/03-application-servers.md b/docs/books/web_services/03-application-servers.md index 568fd3c07c..54ea1cb429 100644 --- a/docs/books/web_services/03-application-servers.md +++ b/docs/books/web_services/03-application-servers.md @@ -191,10 +191,10 @@ php_value[session.save_path] = /var/lib/php/session php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache ``` -| Instructions | Description | -|--------------|---------------------------------------------------------------| +| Instructions | Description | +|--------------|----------------------------------------------------------------------------------------------------------------------------------| | `[pool]` | Process pool name. The configuration file can comprise several process pools (the pool's name in brackets starts a new section). | -| `listen` | Defines the listening interface or the Unix socket used. | +| `listen` | Defines the listening interface or the Unix socket used. | #### Configuring the way to access php-fpm processes diff --git a/docs/books/web_services/042-database-servers-mysql.md b/docs/books/web_services/042-database-servers-mysql.md index 0d097aef5d..244d1418f7 100644 --- a/docs/books/web_services/042-database-servers-mysql.md +++ b/docs/books/web_services/042-database-servers-mysql.md @@ -52,7 +52,7 @@ You can now follow the previous chapter by replacing the following commands: You will have to use a different repository to install the latest version of MySQL server. -Visit this page: https://dev.mysql.com/downloads/repo/yum/ and copy the repository URL. +Visit this page: [https://dev.mysql.com/downloads/repo/yum/](https://dev.mysql.com/downloads/repo/yum/) and copy the repository URL. For example: diff --git a/docs/books/web_services/05-load-balancer-proxies.md b/docs/books/web_services/05-load-balancer-proxies.md index 943494a9e5..e88a71955a 100644 --- a/docs/books/web_services/05-load-balancer-proxies.md +++ b/docs/books/web_services/05-load-balancer-proxies.md @@ -4,6 +4,4 @@ contributors: title: Part 5. Load balancing, caching and proxyfication --- -# Part 5. Load balancing, caching and proxyfication - In this part, we will discuss existing solutions for improving traffic performance and accepting more and more client connections. diff --git a/docs/books/web_services/051-load-balancer-proxies-haproxy.md b/docs/books/web_services/051-load-balancer-proxies-haproxy.md index b07cfdd62d..4d6bb4d38c 100644 --- a/docs/books/web_services/051-load-balancer-proxies-haproxy.md +++ b/docs/books/web_services/051-load-balancer-proxies-haproxy.md @@ -8,7 +8,6 @@ title: Part 5.1 HAProxy This content is not written yet. - === "Contact" If you have questions with respect to this content or to report concerns regarding the use or misuse content please do not hesitate to contact us at [info@rockylinux.org](mailto:info@rockylinux.org). - === "Disclaimer" Rocky Linux and the Rocky Enterprise Software Foundation (RESF) does not make any express or implied warranties, including but not limited to the warranties of non-infringement of any third party intellectual property rights. RESF does not warrant that any pending trademark applications for trademarks of RESF will result in any granted trademark protection. RESF shall not be liable for any claims relating to user's activities falling within the scope of the permission and user hereby agrees to indemnify, defend and hold RESF and its contributors harmless against any such claim. @@ -14,4 +13,3 @@ === "License" This content is licensed under under [Attribution-Share Alike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/) license unless otherwise noted. - diff --git a/include/teams/community/content_bottom.md b/include/teams/community/content_bottom.md index ad800ed20c..700232bb52 100644 --- a/include/teams/community/content_bottom.md +++ b/include/teams/community/content_bottom.md @@ -1,12 +1,11 @@ +### Additional Information -

Additional Information

=== "Contact" If you have questions with respect to this content or to report concerns regarding the use or misuse content please do not hesitate to contact us at [community@rockylinux.org](mailto:community@rockylinux.org). - === "Disclaimer" Rocky Linux and the Rocky Enterprise Software Foundation (RESF) does not make any express or implied warranties, including but not limited to the warranties of non-infringement of any third party intellectual property rights. RESF does not warrant that any pending trademark applications for trademarks of RESF will result in any granted trademark protection. RESF shall not be liable for any claims relating to user's activities falling within the scope of the permission and user hereby agrees to indemnify, defend and hold RESF and its contributors harmless against any such claim. @@ -14,4 +13,3 @@ === "License" This content is licensed under under [Attribution-Share Alike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/) license unless otherwise noted. - diff --git a/include/teams/testing/contacts_top.md b/include/teams/testing/contacts_top.md index 23b387dbfb..4b08d47686 100644 --- a/include/teams/testing/contacts_top.md +++ b/include/teams/testing/contacts_top.md @@ -1,7 +1,8 @@ ## Contact Information -| | | -| - | - | -| **Owner** | Testing Team | -| **Email Contact** | testing@rockylinux.org | -| **Mattermost Contacts** | `@stack`, `@tcooper` | -| **Mattermost Channels** | `~Testing` | + +| | | +| ----------------------- | ------------------------ | +| **Owner** | Testing Team | +| **Email Contact** | | +| **Mattermost Contacts** | `@stack`, `@tcooper` | +| **Mattermost Channels** | `~Testing` | diff --git a/include/teams/testing/content_bottom.md b/include/teams/testing/content_bottom.md index 700b44dbd3..d96761236f 100644 --- a/include/teams/testing/content_bottom.md +++ b/include/teams/testing/content_bottom.md @@ -1,12 +1,11 @@ +### Additional Information -

Additional Information

=== "Contact" If you have questions with respect to this content or to report concerns regarding the use or misuse content please do not hesitate to contact us at [info@rockylinux.org](mailto:info@rockylinux.org). - === "Disclaimer" Rocky Linux and the Rocky Enterprise Software Foundation (RESF) does not make any express or implied warranties, including but not limited to the warranties of non-infringement of any third party intellectual property rights. RESF does not warrant that any pending trademark applications for trademarks of RESF will result in any granted trademark protection. RESF shall not be liable for any claims relating to user's activities falling within the scope of the permission and user hereby agrees to indemnify, defend and hold RESF and its contributors harmless against any such claim. @@ -14,4 +13,3 @@ === "License" This content is licensed under under [Attribution-Share Alike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/) license unless otherwise noted. - diff --git a/include/teams/testing/members_full.md b/include/teams/testing/members_full.md index 94f321d6b7..45ea45094e 100644 --- a/include/teams/testing/members_full.md +++ b/include/teams/testing/members_full.md @@ -1,10 +1,9 @@ -| Role | Name | Email | Mattermost Name | IRC Name | -| -------------- | --------------- | ----------------------- | ------------------ | --------- | -| Testing Lead | Chris Stackpole | stack@rockylinux.org | @stack | | -| Testing Team | Al Bowles | | @raktajino | raktajino | -| Testing Team | Trevor Cooper | tcooper@rockylinux.org | @tcooper | | -| Testing Team | Lukas Magauer | lukas@magauer.eu | @lumarel | | -| Testing Team | Alan Marshall | | @alangm | alangm | -| Testing Team | Anthony Navarro | | @anavarro10 | | -| Testing Team | Bob Robison | grayeul@gmail.com | @grayeul | | - +| Role | Name | Email | Mattermost Name | IRC Name | +| ------------ | --------------- | ------------------------ | --------------- | --------- | +| Testing Lead | Chris Stackpole | | @stack | | +| Testing Team | Al Bowles | | @raktajino | raktajino | +| Testing Team | Trevor Cooper | | @tcooper | | +| Testing Team | Lukas Magauer | | @lumarel | | +| Testing Team | Alan Marshall | | @alangm | alangm | +| Testing Team | Anthony Navarro | | @anavarro10 | | +| Testing Team | Bob Robison | | @grayeul | | diff --git a/include/teams/testing/members_no_role.md b/include/teams/testing/members_no_role.md index 875f7dfa71..b53d686360 100644 --- a/include/teams/testing/members_no_role.md +++ b/include/teams/testing/members_no_role.md @@ -1,11 +1,9 @@ - - | Name | Email | Mattermost Name | IRC Name | - | --------------- | ----------------------- | ------------------ | --------- | - | Chris Stackpole | stack@rockylinux.org | @stack | | - | Al Bowles | | @raktajino | raktajino | - | Trevor Cooper | tcooper@rockylinux.org | @tcooper | | - | Lukas Magauer | lukas@magauer.eu | @lumarel | | - | Alan Marshall | | @alangm | alangm | - | Rich Alloway | | @ralloway | | - | Anthony Navarro | | @anavarro10 | | - +| Name | Email | Mattermost Name | IRC Name | +| --------------- | ------------------------- | ------------------ | --------- | +| Chris Stackpole | | @stack | | +| Al Bowles | | @raktajino | raktajino | +| Trevor Cooper | | @tcooper | | +| Lukas Magauer | | @lumarel | | +| Alan Marshall | | @alangm | alangm | +| Rich Alloway | | @ralloway | | +| Anthony Navarro | | @anavarro10 | | diff --git a/include/teams/testing/qa_content_example_only.md b/include/teams/testing/qa_content_example_only.md index fb14dd4f49..754024ced6 100644 --- a/include/teams/testing/qa_content_example_only.md +++ b/include/teams/testing/qa_content_example_only.md @@ -1,3 +1,2 @@ - !!! error "CONTENT EXAMPLE ONLY" Content on this page *may be* copy-pasta from [Fedora Quality Assurance](https://fedoraproject.org/wiki/QA) documents and needs to be replaced and/or reviewed before publishing for applicability for Rocky Linux. diff --git a/include/teams/testing/qa_testcase_bottom.md b/include/teams/testing/qa_testcase_bottom.md index b5301f633b..fee82d6e79 100644 --- a/include/teams/testing/qa_testcase_bottom.md +++ b/include/teams/testing/qa_testcase_bottom.md @@ -1,11 +1,9 @@ - -

Additional Information

+### Additional Information === "Contact" If you have questions with respect to this content or to report concerns regarding the use or misuse content please do not hesitate to contact us at [testing@rockylinux.org](mailto:testing@rockylinux.org). - === "Disclaimer" Rocky Linux and the Rocky Enterprise Software Foundation (RESF) does not make any express or implied warranties, including but not limited to the warranties of non-infringement of any third party intellectual property rights. RESF does not warrant that any pending trademark applications for trademarks of RESF will result in any granted trademark protection. RESF shall not be liable for any claims relating to user's activities falling within the scope of the permission and user hereby agrees to indemnify, defend and hold RESF and its contributors harmless against any such claim. diff --git a/include/teams/testing/qa_testcase_supported_systems.md b/include/teams/testing/qa_testcase_supported_systems.md index b0d5bd767e..bd8bcdf3d5 100644 --- a/include/teams/testing/qa_testcase_supported_systems.md +++ b/include/teams/testing/qa_testcase_supported_systems.md @@ -1,5 +1,4 @@ - -

Supported Systems and Hardware Classes

+### Supported Systems and Hardware Classes === "x86_64" diff --git a/include/teams/testing/rc_content_bottom.md b/include/teams/testing/rc_content_bottom.md index 467d5dcd6e..d8e70baf27 100644 --- a/include/teams/testing/rc_content_bottom.md +++ b/include/teams/testing/rc_content_bottom.md @@ -1,11 +1,9 @@ - -

Additional Information

+### Additional Information === "Contact" If you have questions with respect to this content or to report concerns regarding the use or misuse content please do not hesitate to contact us at [testing@rockylinux.org](mailto:testing@rockylinux.org). - === "Disclaimer" Rocky Linux and the Rocky Enterprise Software Foundation (RESF) does not make any express or implied warranties, including but not limited to the warranties of non-infringement of any third party intellectual property rights. RESF does not warrant that any pending trademark applications for trademarks of RESF will result in any granted trademark protection. RESF shall not be liable for any claims relating to user's activities falling within the scope of the permission and user hereby agrees to indemnify, defend and hold RESF and its contributors harmless against any such claim. diff --git a/include/teams/testing/rc_content_example_only.md b/include/teams/testing/rc_content_example_only.md index 5e8069bc12..960c71b7d0 100644 --- a/include/teams/testing/rc_content_example_only.md +++ b/include/teams/testing/rc_content_example_only.md @@ -1,3 +1,2 @@ - !!! error "CONTENT EXAMPLE ONLY" Content on this page *may be* copied from [Fedora Release Requirements](https://fedoraproject.org/wiki/Fedora_Release_Criteria) documentation and needs to be replaced and/or reviewed before publishing for applicability for Rocky Linux.