Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
elearning:workbooks:centos:8:utilisateur:l103 [2020/09/07 09:54] – admin | elearning:workbooks:centos:8:utilisateur:l103 [2024/04/28 15:08] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
+ | |||
+ | Version : **2024.01** | ||
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
Ligne 9: | Ligne 11: | ||
* **LCF403 - Aide et Documentation** | * **LCF403 - Aide et Documentation** | ||
* Contenu du Module | * Contenu du Module | ||
- | * L'Aide des Commandes Externes au Shell | + | * LAB #1 - Aide des Commandes |
- | * L'Aide des Commandes Internes du Shell | + | * 1.1 - L'Aide des Commandes Externes au Shell |
- | * La Commande man | + | * 1.2 - L'Aide des Commandes Internes du Shell |
- | * La Commande apropos | + | * LAB #2 - La Commande man |
- | | + | * 2.1 - Les Commandes mandb et whatis |
- | * La Commande info | + | * 2.2 - La Commande apropos |
+ | * LAB #3 - La Commande info | ||
+ | |||
+ | =====LAB #1 - Aide des Commandes===== | ||
- | =====L'Aide des Commandes Externes au Shell===== | + | ====1.1 - L'Aide des Commandes Externes au Shell==== |
Les commandes externes au shell sont des binaires exécutables ou des scripts, généralement situés dans /bin, /sbin, /usr/bin ou /usr/sbin : | Les commandes externes au shell sont des binaires exécutables ou des scripts, généralement situés dans /bin, /sbin, /usr/bin ou /usr/sbin : | ||
Ligne 63: | Ligne 68: | ||
</ | </ | ||
- | =====L'Aide des Commandes Internes du Shell===== | + | ====1.2 - L'Aide des Commandes Internes du Shell==== |
Les commandes internes au shell sont des commandes telles **type**, **cd** ou **umask**. Pour vérifier le type de commande, il faut utiliser la commande **type** : | Les commandes internes au shell sont des commandes telles **type**, **cd** ou **umask**. Pour vérifier le type de commande, il faut utiliser la commande **type** : | ||
Ligne 156: | Ligne 161: | ||
</ | </ | ||
- | =====La Commande man===== | + | =====LAB #2 - La Commande man===== |
- | La commande man donne accès au manuel de la commande passée en argument. Par exemple **man help** sous RHEL/ | + | La commande man donne accès au manuel de la commande passée en argument. Par exemple **man passwd** : |
< | < | ||
+ | [root@centos8 ~]# man passwd | ||
BASH_BUILTINS(1) | BASH_BUILTINS(1) | ||
Ligne 250: | Ligne 256: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
passwd: / | passwd: / | ||
</ | </ | ||
Pour visualiser une section spécifique, | Pour visualiser une section spécifique, | ||
- | + | | |
- | $ man 5 passwd [Entrée] | + | |
- | + | ||
- | L' | + | |
- | + | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
- | chpasswd (8) - update passwords in batch mode | + | PASSWD(5) Linux Programmer' |
- | fgetpwent_r (3) - get passwd file entry reentrantly | + | |
- | getpwent_r (3) - get passwd file entry reentrantly | + | |
- | gpasswd (1) - administer /etc/group and / | + | |
- | grub2-mkpasswd-pbkdf2 (1) - Generate a PBKDF2 password hash. | + | |
- | kpasswd (1) - change a user's Kerberos password | + | |
- | lpasswd (1) - Change group or user password | + | |
- | lppasswd (1) - add, change, or delete digest passwords. | + | |
- | pam_localuser (8) - require users to be listed in / | + | |
- | passwd (1) - update user's authentication tokens | + | |
- | sslpasswd (1ssl) | + | |
- | passwd (5) - password file | + | |
- | passwd2des (3) - RFS password encryption | + | |
- | pwhistory_helper (8) - Helper binary that transfers password hashes from passwd | + | |
- | smbpasswd | + | |
- | smbpasswd (8) - change a user' | + | |
- | userpasswd | + | |
- | vncpasswd (1) - change the VNC password | + | |
- | </ | + | |
- | Le résultat est une liste de commandes suivies par une description brève de celles-ci. | + | NAME |
+ | | ||
- | <WRAP center round important> | + | DESCRIPTION |
- | **Important** - Notez que les numéros entre parenthèses indiquent les sections disponibles. | + | The /etc/passwd file is a text file that describes user login accounts for the system. It should have read permission allowed for all users (many utilities, like ls(1) use it to map |
- | </ | + | user IDs to usernames), but write access only for the superuser. |
- | ====Options de la commande==== | + | In the good old days there was no great problem with this general read permission. |
+ | | ||
+ | an ' | ||
- | Les options de cette commande sont : | + | If the encrypted password, whether in /etc/passwd or in / |
+ | | ||
- | < | + | If the encrypted password in /etc/passwd is " |
- | [root@centos7 ~]# man --help | + | |
- | Usage: man [OPTION...] [SECTION] PAGE... | + | |
- | -C, --config-file=FILE | + | |
- | | + | or herself using a password. |
- | | + | |
- | --warnings[=WARNINGS] | + | |
- | Main modes of operation: | + | If you create a new login, first put an asterisk |
- | -f, --whatis | + | |
- | -k, --apropos | + | |
- | -K, --global-apropos | + | |
- | -l, --local-file | + | |
- | -w, --where, --path, --location | + | |
- | print physical location of man page(s) | + | |
- | -W, --where-cat, | + | |
- | print physical location of cat file(s) | + | |
- | -c, --catman | + | Each line of the file describes a single user, and contains seven colon-separated fields: |
- | -R, --recode=ENCODING | + | |
- | | + | name:password: |
- | -L, --locale=LOCALE | + | |
- | -m, --systems=SYSTEM | + | |
- | -M, --manpath=PATH | + | |
- | -S, -s, --sections=LIST | + | The field are as follows: |
- | -e, --extension=EXTENSION | + | |
- | -i, --ignore-case | + | |
- | -I, --match-case | + | |
- | --regex | + | |
- | --wildcard | + | |
- | --names-only | + | |
- | not descriptions | + | |
- | -a, --all find all matching manual pages | + | |
- | -u, --update | + | ple, finger(1)) display information from this field. |
- | --no-subpages | + | |
- | | + | |
+ | | ||
+ | </code> | ||
- | | + | ====2.1 |
- | -P, --pager=PAGER use program PAGER to display output | + | |
- | | + | |
- | -7, --ascii | + | Chaque page de manuel contient une brève description. Ces descriptions ainsi que le nom du manuel sont stockés dans la base de données **whatis**. |
- | -E, --encoding=ENCODING | + | |
- | --no-hyphenation, | + | |
- | --no-justification, | + | |
- | -p, --preprocessor=STRING | + | |
- | e - [n]eqn, p - pic, t - tbl, | + | |
- | g - grap, r - refer, v - vgrind | + | |
- | -t, --troff | + | Cette base de données peut être maintenue manuellement par root en invoquant l' |
- | -T, --troff-device[=DEVICE] | + | |
- | -H, --html[=BROWSER] | + | L' |
- | -X, --gxditview[=RESOLUTION] | + | |
- | (X11): | + | |
- | -X = -TX75, -X100 = -TX100, -X100-12 = -TX100-12 | + | |
- | -Z, --ditroff | + | |
- | -?, --help | + | < |
- | | + | [root@centos8 ~]# mandb |
- | -V, --version | + | Processing manual pages under / |
+ | Updating index cache for path `/ | ||
+ | Checking for stray cats under / | ||
+ | Checking for stray cats under / | ||
+ | ... | ||
+ | Processing manual pages under / | ||
+ | Purging old database entries in / | ||
+ | Processing manual pages under / | ||
+ | 0 man subdirectories contained newer manual pages. | ||
+ | 0 manual pages were added. | ||
+ | 0 stray cats were added. | ||
+ | 17 old database entries were purged. | ||
+ | </ | ||
- | Mandatory or optional arguments to long options are also mandatory or optional | + | La commande **whatis** peut maintenant être utilisée pour identifier les sections des manuels disponibles pour une commande donnée : |
- | for any corresponding short options. | + | |
- | Report bugs to cjwatson@debian.org. | + | < |
+ | [root@centos8 ~]# whatis passwd | ||
+ | openssl-passwd (1ssl) - compute password hashes | ||
+ | passwd (1) - update user's authentication tokens | ||
+ | passwd (5) - password file | ||
</ | </ | ||
- | =====La Commande apropos===== | + | ====2.2 - La Commande apropos==== |
La commande **apropos** cherche dans la base de données **whatis** la chaine de caractères passée en argument à la commande. Sans option, la sortie obtenue est identique à la commande **man -k** : | La commande **apropos** cherche dans la base de données **whatis** la chaine de caractères passée en argument à la commande. Sans option, la sortie obtenue est identique à la commande **man -k** : | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
+ | chgpasswd (8) - update group passwords in batch mode | ||
chpasswd (8) - update passwords in batch mode | chpasswd (8) - update passwords in batch mode | ||
fgetpwent_r (3) - get passwd file entry reentrantly | fgetpwent_r (3) - get passwd file entry reentrantly | ||
Ligne 381: | Ligne 354: | ||
gpasswd (1) - administer /etc/group and / | gpasswd (1) - administer /etc/group and / | ||
grub2-mkpasswd-pbkdf2 (1) - Generate a PBKDF2 password hash. | grub2-mkpasswd-pbkdf2 (1) - Generate a PBKDF2 password hash. | ||
- | kpasswd (1) - change a user's Kerberos password | ||
lpasswd (1) - Change group or user password | lpasswd (1) - Change group or user password | ||
- | lppasswd | + | openssl-passwd |
pam_localuser (8) - require users to be listed in /etc/passwd | pam_localuser (8) - require users to be listed in /etc/passwd | ||
passwd (1) - update user's authentication tokens | passwd (1) - update user's authentication tokens | ||
- | sslpasswd (1ssl) | ||
passwd (5) - password file | passwd (5) - password file | ||
passwd2des (3) - RFS password encryption | passwd2des (3) - RFS password encryption | ||
- | pwhistory_helper (8) - Helper binary that transfers password hashes from passwd or shadow to ... | + | pwhistory_helper (8) - Helper binary that transfers password hashes from passwd or shadow to opasswd |
smbpasswd (5) - The Samba encrypted password file | smbpasswd (5) - The Samba encrypted password file | ||
- | smbpasswd (8) - change a user's SMB password | ||
- | userpasswd (1) - A graphical tool to allow users to change their passwords. | ||
- | vncpasswd (1) - change the VNC password | ||
- | </ | ||
- | |||
- | ====Options de la commande==== | ||
- | |||
- | Les options de cette commande sont : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# apropos --help | ||
- | Usage: apropos [OPTION...] KEYWORD... | ||
- | |||
- | -d, --debug | ||
- | -v, --verbose | ||
- | -e, --exact | ||
- | -r, --regex | ||
- | -w, --wildcard | ||
- | -a, --and require all keywords to match | ||
- | -l, --long | ||
- | -C, --config-file=FILE | ||
- | -L, --locale=LOCALE | ||
- | -m, --systems=SYSTEM | ||
- | -M, --manpath=PATH | ||
- | -s, --sections=LIST, | ||
- | | ||
- | -?, --help | ||
- | --usage | ||
- | -V, --version | ||
- | |||
- | Mandatory or optional arguments to long options are also mandatory or optional | ||
- | for any corresponding short options. | ||
- | |||
- | The --regex option is enabled by default. | ||
- | |||
- | Report bugs to cjwatson@debian.org. | ||
- | </ | ||
- | |||
- | =====Les Commandes makewhatis et whatis sous RHEL/CentOS 6.6===== | ||
- | |||
- | Chaque page de manuel contient une brève description. Ces descriptions ainsi que le nom du manuel sont stockés dans la base de données **whatis**. | ||
- | |||
- | Cette base de données peut être maintenue manuellement par root en invoquant l' | ||
- | |||
- | L' | ||
- | |||
- | < | ||
- | [root@centos6 ~]# makewhatis | ||
- | </ | ||
- | |||
- | La commande **whatis** peut maintenant être utilisée pour identifier les sections des manuels disponibles pour une commande donnée : | ||
- | |||
- | < | ||
- | [root@centos6 ~]# whatis passwd | ||
- | passwd | ||
- | passwd | ||
- | passwd [sslpasswd] | ||
- | </ | ||
- | |||
- | ====Options des commandes==== | ||
- | |||
- | Les options de la commande **makewhatis** sont : | ||
- | |||
- | < | ||
- | [root@centos6 ~]# makewhatis --help | ||
- | Usage: makewhatis [-s sections] [-u] [-v] [-w] [manpath] [-c [catpath]] [-o whatisdb] | ||
- | This will build the whatis database for the man pages | ||
- | found in manpath and the cat pages found in catpath. | ||
- | -s: sections (default: 1 1p 8 2 3 3p 4 5 6 7 9 0p n l p o 1x 2x 3x 4x 5x 6x 7x 8x) | ||
- | -u: update database with pages added today | ||
- | -U: update database with pages added since last makewhatis run | ||
- | -v: verbose | ||
- | -o: location of whatis database (default: / | ||
- | -w: use manpath obtained from `man --path` | ||
- | | ||
- | | ||
- | | ||
- | </ | ||
- | |||
- | Les options de la commande **whatis** sont : | ||
- | |||
- | < | ||
- | [root@centos6 ~]# whatis --help | ||
- | usage: whatis keyword ... | ||
- | </ | ||
- | |||
- | =====Les Commandes mandb et whatis sous RHEL/CentOS 7===== | ||
- | |||
- | Sous RHEL/CentOS 7 la base de données peut être maintenue manuellement par root en invoquant l' | ||
- | |||
- | L' | ||
- | |||
- | < | ||
- | [root@centos7 ~]# mandb | ||
- | Purging old database entries in / | ||
- | mandb: warning: / | ||
- | Processing manual pages under / | ||
- | Purging old database entries in / | ||
- | Processing manual pages under / | ||
- | Purging old database entries in / | ||
- | Processing manual pages under / | ||
- | Purging old database entries in / | ||
- | Processing manual pages under / | ||
- | Purging old database entries in / | ||
- | Processing manual pages under / | ||
- | Purging old database entries in / | ||
- | ... | ||
- | 0 man subdirectories contained newer manual pages. | ||
- | 0 manual pages were added. | ||
- | 0 stray cats were added. | ||
- | 0 old database entries were purged. | ||
- | </ | ||
- | |||
- | La commande **whatis** peut maintenant être utilisée pour identifier les sections des manuels disponibles pour une commande donnée : | ||
- | |||
- | < | ||
- | [root@centos7 ~]# whatis passwd | ||
sslpasswd (1ssl) | sslpasswd (1ssl) | ||
- | passwd (1) - update user's authentication tokens | ||
- | passwd (5) - password file | ||
</ | </ | ||
- | ====Options des commandes==== | + | Le résultat est une liste de commandes |
- | Les options de la commande **mandb** sont : | + | <WRAP center round important 60%> |
- | + | **Important** - Notez que les numéros entre parenthèses indiquent les sections | |
- | <code> | + | </WRAP> |
- | [root@centos7 ~]# mandb --help | + | |
- | Usage: mandb [OPTION...] [MANPATH] | + | |
- | + | ||
- | -c, --create | + | |
- | -C, --config-file=FILE | + | |
- | -d, --debug | + | |
- | -f, --filename=FILENAME | + | |
- | -p, --no-purge | + | |
- | -q, --quiet | + | |
- | -s, --no-straycats | + | |
- | -t, --test | + | |
- | -u, --user-db | + | |
- | -?, --help | + | |
- | --usage | + | |
- | -V, --version | + | |
- | + | ||
- | Mandatory or optional arguments to long options are also mandatory or optional | + | |
- | for any corresponding short options. | + | |
- | + | ||
- | Report bugs to cjwatson@debian.org. | + | |
- | </ | + | |
- | + | ||
- | Les options de la commande | + | |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# whatis --help | + | |
- | Usage: whatis [OPTION...] KEYWORD... | + | |
- | + | ||
- | -d, --debug | + | |
- | -v, --verbose | + | |
- | -r, --regex | + | |
- | -w, --wildcard | + | |
- | -l, --long | + | |
- | -C, --config-file=FILE | + | |
- | -L, --locale=LOCALE | + | |
- | -m, --systems=SYSTEM | + | |
- | -M, --manpath=PATH | + | |
- | -s, --sections=LIST, --section=LIST | + | |
- | | + | |
- | -?, --help | + | |
- | --usage | + | |
- | -V, --version | + | |
- | + | ||
- | Mandatory or optional arguments to long options are also mandatory or optional | + | |
- | for any corresponding short options. | + | |
- | + | ||
- | Report bugs to cjwatson@debian.org. | + | |
- | </code> | + | |
- | =====La Commande info===== | + | =====LAB #3 - La Commande info===== |
En plus du système des manuels, des informations concernant des exécutables peuvent être trouvées dans le système **info**. De l' | En plus du système des manuels, des informations concernant des exécutables peuvent être trouvées dans le système **info**. De l' | ||
Ligne 590: | Ligne 394: | ||
< | < | ||
- | [root@centos7 | + | [root@centos8 |
... | ... | ||
- | File: dir | + | File: dir, |
- | | + | This is the Info main menu (aka directory |
- | | + | A few useful |
- | " | + | |
- | " | + | |
- | | + | |
- | | + | |
+ | ' | ||
+ | ' | ||
- | * Menu: | + | * Menu: |
Archiving | Archiving | ||
Ligne 609: | Ligne 413: | ||
Basics | Basics | ||
+ | * Bash: (bash). | ||
* Common options: (coreutils)Common options. | * Common options: (coreutils)Common options. | ||
* Coreutils: (coreutils). | * Coreutils: (coreutils). | ||
* Date input formats: (coreutils)Date input formats. | * Date input formats: (coreutils)Date input formats. | ||
+ | * Ed: (ed). The GNU line editor | ||
* File permissions: | * File permissions: | ||
Access modes. | Access modes. | ||
- | -----Info: (dir)Top, 2027 lines --Top----------------------------------------------------------- | + | * Finding files: (find). |
- | Welcome to Info version 5.1. Type h for help, m for menu item. | + | * time: (time). |
- | </ | + | |
- | ====Options de la commande==== | + | Compression |
- | + | -----Info: (dir)Top, 307 lines --Top------------------------------------------------------------------------------ | |
- | Les options de cette commande sont : | + | Welcome |
- | + | ||
- | < | + | |
- | [root@centos7 ~]# info --help | + | |
- | Usage: info [OPTION]... [MENU-ITEM...] | + | |
- | + | ||
- | Read documentation in Info format. | + | |
- | + | ||
- | Options: | + | |
- | -k, --apropos=STRING | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | The first non-option argument, if present, is the menu entry to start from; | + | |
- | it is searched for in all `dir' files along INFOPATH. | + | |
- | If it is not present, info merges all `dir' files and shows the result. | + | |
- | Any remaining arguments are treated as the names of menu | + | |
- | items relative to the initial node visited. | + | |
- | + | ||
- | For a summary of key bindings, type h within Info. | + | |
- | + | ||
- | Examples: | + | |
- | info show top-level dir menu | + | |
- | info info show the general manual for Info readers | + | |
- | info info-stnd show the manual specific to this Info program | + | |
- | info emacs start at emacs node from top-level dir | + | |
- | info emacs buffers | + | |
- | info --show-options emacs start at node with emacs' command line options | + | |
- | info --subnodes | + | |
- | info -f ./ | + | |
- | + | ||
- | Email bug reports to bug-texinfo@gnu.org, | + | |
- | general questions and discussion | + | |
- | Texinfo home page: http:// | + | |
</ | </ | ||
----- | ----- | ||
- | < | + | Copyright © 2024 Hugh Norris. |
- | <div align=" | + | |
- | Copyright © 2020 Hugh Norris.< | + | |
- | </ | + | |
- | </ | + | |
- | ----- | + |