level 0 : arrêt système
level 1 : mode CLI maintenance ou single-user sans réseau (linux rescue)
level 2 : mode CLI multiuser sans réseau
level 3 : mode CLI multiuser avec réseau
level 4 : mode graphique libre à configurer
level 5 : mode graphique multiuser
level 6 : redémarrage système
Connaitre le runlevel actuel du host :
runlevel
Passer en mode console (level 3) :
init 3
ou
telinit 3
chkconfig --list
chkconfig --level 012345 bluetooth off
chkconfig --level 135 25 80 bluetooth on
Quelques commandes utiles pour l'administration des processus :
ps -ef
ou
ps aux
pstree
pidof
pgrep
lsmod
lspci
Le /proc contient des dossiers temporaires des process en cours. Les informations visibles par TOP sont basés sur l'analyse des fichiers dynamiques qui s'y trouvent. Il est possible de trouver des informations sur le matériel dans les répertoires /proc/acpi /proc/cpuinfo /proc/devices.
top
PID = Unique Process ID
SIZE = Virtual image size; size of text+data+stack
RSS = Resident set size; kilobytes of program in memory
TTY = Controlling tty
STAT = Information about the status of the proc
R = runnable
S = sleeping
D = uninterruptible sleep
T = stopped or traced
Z = zombie process
Second field = W if the process has no resident pages
Third field = N if the process has a positive nice value
kill -2 <PID>
kill <PID>
ou
kill -TERM <PID>
Un kill classique réalise un kill -15 (SIGTERM)
kill -9 <PID>
ou
kill -KILL <PID>
Cette commande est risqué dans la mesure où elle sèche immédiatement le process.
tcpdump
sysctl -n net.ipv4.icmp_echo_ignore_all = 1
La commande sysctl va écrire dans /etc/sysctl.conf
echo 1 > /proc/sys/net/ipv4/ip_forward