Linux: Log Everyone Out Of The System

Linux: Log Everyone Out Of The System

To log everyone out of a Linux system, you can use the init command with the 0 or 6 argument. init is the first process that is started when the system boots, and it is responsible for starting and managing other processes on the system.

The 0 argument tells init to shut down the system, and the 6 argument tells it to reboot the system.

Here's an example of how to use init to log everyone out of the system:

$ sudo init 0
Sou‮w:ecr‬ww.lautturi.com

This will shut down the system, and all users will be logged out.

Note: You will need to have the necessary privileges to run the sudo command.

It's also important to note that the specific syntax and options for the init command may vary depending on your Linux distribution and version. Consult the init man page or documentation for your system for more information.

Keep in mind that using the init command to log everyone out of the system can be disruptive, and it should only be used as a last resort. It's usually better to use other methods, such as the logout command or the exit shell builtin, to log out of the system.

Created Time:2017-10-30 10:17:46  Author:lautturi