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 | ||
| 04-linux:10-administration:20-exploitation [2015/10/16 23:38] – [Modifier le timeout du sudo] Roge | 04-linux:10-administration:20-exploitation [2017/10/06 23:40] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | |||
| + | ====== Exploitation ====== | ||
| + | |||
| + | |||
| + | ===== Arrêt machine ===== | ||
| + | |||
| + | |||
| + | * '' | ||
| + | |||
| + | * '' | ||
| + | |||
| + | |||
| + | |||
| + | ===== Execution d'une commande en root sans password ===== | ||
| + | |||
| + | |||
| + | Dans le fichier ''/ | ||
| + | |||
| + | **Utiliser '' | ||
| + | |||
| + | Ajouter la ligne : | ||
| + | |||
| + | <code bash> | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | On appelle alors la commande toujours avec sudo, mais le mot de passe n'est plus demandé. | ||
| + | |||
| + | ===== Modifier le timeout du sudo ===== | ||
| + | |||
| + | Modifier les paramètres de **sudo** : | ||
| + | |||
| + | * '' | ||
| + | |||
| + | Sur la ligne //" | ||
| + | |||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | ===== Affiche l' | ||
| + | |||
| + | * '' | ||
| + | <code bash> | ||
| + | Filesystem | ||
| + | rootfs | ||
| + | / | ||
| + | devtmpfs | ||
| + | tmpfs 27M 224K | ||
| + | tmpfs | ||
| + | tmpfs 53M | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ===== afficher les processus sous forme d' | ||
| + | |||
| + | * '' | ||
| + | <code bash> | ||
| + | init─┬─cron | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ===== informations en continu sur l' | ||
| + | |||
| + | Cette commade permet de suivre les ressources que les processus utilisent (quantité de RAM, pourcentage de CPU, la durée de ce processus depuis son demarrage). | ||
| + | |||
| + | |||
| + | * '' | ||
| + | |||
| + | |||
| + | <code bash>top - 01:32:08 up 2:59, 2 users, | ||
| + | Tasks: | ||
| + | %Cpu(s): | ||
| + | KiB Mem: 269076 total, | ||
| + | KiB Swap: | ||
| + | |||
| + | PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | ||
| + | 18338 roge 20 | ||
| + | 1 root 20 | ||
| + | 2 root 20 | ||
| + | 3 root 20 | ||
| + | 5 root 0 -20 | ||
| + | 7 root 20 | ||
| + | 8 root 20 | ||
| + | 9 root 20 | ||
| + | 10 root 0 -20 | ||
| + | 11 root 20 | ||
| + | 12 root 0 -20 | ||
| + | 13 root 0 -20 | ||
| + | 14 root 0 -20 | ||
| + | 15 root 0 -20 | ||
| + | 16 root 0 -20 | ||
| + | 17 root 20 | ||
| + | 18 root 20 | ||
| + | 19 root 0 -20 | ||
| + | 20 root 20 | ||
| + | </ | ||
| + | |||
| + | ===== Quels utilisateurs sont loggés ===== | ||
| + | |||
| + | Cette commande permet de savoir quels utilisateurs sont loggés sur le système et ce qu'ils font. | ||
| + | |||
| + | * '' | ||
| + | |||
| + | <code bash> | ||
| + | | ||
| + | USER | ||
| + | roge | ||
| + | roge | ||
| + | roge@raspi ~ $ who | ||
| + | roge | ||
| + | roge | ||
| + | </ | ||
| + | |||
| + | ===== Variables d' | ||
| + | |||
| + | Affiche les variables d' | ||
| + | |||
| + | * '' | ||
| + | |||
| + | |||
| + | <code bash> | ||
| + | TERM=xterm | ||
| + | SHELL=/ | ||
| + | SSH_CLIENT=192.168.0.172 41512 22 | ||
| + | SSH_TTY=/ | ||
| + | USER=roge | ||
| + | LS_COLORS=rs=0: | ||
| + | MAIL=/ | ||
| + | PATH=/ | ||
| + | PWD=/ | ||
| + | LANG=en_GB.UTF-8 | ||
| + | SHLVL=1 | ||
| + | HOME=/ | ||
| + | LOGNAME=roge | ||
| + | SSH_CONNECTION=192.168.0.172 41512 192.168.0.174 22 | ||
| + | _=/ | ||
| + | </ | ||
| + | |||
| + | ===== information poussée fichier ===== | ||
| + | |||
| + | Cette commande permet d' | ||
| + | |||
| + | * '' | ||
| + | |||
| + | <code bash> | ||
| + | File: `Sauvegarde' | ||
| + | Size: 16 Blocks: 0 IO Block: 4096 | ||
| + | Device: b302h/ | ||
| + | Access: (0777/ | ||
| + | Access: 2014-08-05 21: | ||
| + | Modify: 2014-08-05 21: | ||
| + | Change: 2014-08-05 21: | ||
| + | </ | ||