During the installation of the Setup Components, the user will have to be shutting down, restarting, logging out or simply blocking (i.e lock) the current session
Actions
This actions can be performed as follows →
Shut Down
$ sudo poweroff
Restart
$ sudo reboot
Log out
$ loginctl list-sessions # Get the Session's Number$ loginctl terminate-session <session_number> # Finish a Session
INFO
If the above command is not available because of the system has not been initialized with systemd, use the following one →
$ pkill -SIGTERM --euid "$( id -u )" # Or pkill -15
This allows to all the processes related to the EUID to terminate corrrectly and clean up resources
If any process does not respond to the SIGTERM signal, just sent a KILL signal to it
$ pkill -KILL --euid "$( id -u )" # Or pkill -9
Note that all signal types and their associated numbers can be enumerated as follows through these shell builtins →
$ kill -l # Or trap -l
Session Lock
It can be handled through the X Session Manager called lightDM
To interact with the lightdm daemon, the dm-tool binary comes into actions
$ dm-tool switch-to-greeter # Like the Change-User option in Windows
$ dm-tool lock # Like Windows + L in Windows
INFO
If lightdm does not manages the user sessions and the host has been booted with systemd (i.e. PID 1), then try this →