You are on page 1of 4

TP5

EXERCICE1: init
1.
login: root 
Password: <le mot de passe n’est pas affiché>

2.

root@kali:/# runlevel

N5

3.

root@kali:/# ps -ef

UID PID PPID C STIME TTY TIME CMD

root 1 0 0 Dec27 ? 00:00:06 /sbin/init splash

root 2 0 0 Dec27 ? 00:00:00 [kthreadd]

root 3 2 0 Dec27 ? 00:00:00 [rcu_gp]

root 4 2 0 Dec27 ? 00:00:00 [rcu_par_gp]

….

4.

root@kali:/# ls -l /sbin/init

lrwxrwxrwx 1 root root 20 Dec 2 2019 /sbin/init -> /lib/systemd/systemd

5.

root@kali:/# init --h

init [OPTIONS...] COMMAND

Send control commands to the init daemon

Commands:

0 Power-off the machine

6 Reboot the machine

2, 3, 4, 5 Start runlevelX.target unit


1, s, S Enter rescue mode

q, Q Reload init daemon configuration

u, U Reexecute init daemon

Options:

--help Show this help

--no-wall Don't send wall message before halt/power-off/reboot

See the telinit(8) man page for details.

EXERCICE2: systemd

1.
2.

3.

systemctl restart nom_du_service.service

4.

systemctl disabled nom_du_service.service

5 .

multi-user.target correspond au runlevel historique 3 (Multi-utilisateurs console) et


que graphical.target correspond au runlevel historique 5 (Multi-utilisateurs graphique)
EXERCICE3 : Arrêt du système :

1 .

root@kali:/# shutdown -h +30 "……" 


The system is going down for halt in 30 minutes! 
……
2.

root@kali:/# shutdown -c 


shutdown: Shutdown cancelled.

You might also like