Forrest logo
back to the telinit tool

telinit:tldr:19b9c

telinit: Power off the machine.
$ telinit 0
try on your machine

The command "telinit 0" is used to signal the init process to transition the system into the shutdown state.

Init is the first process spawned by the Linux kernel during the boot process, and it has the PID (process identifier) 1. It has the responsibility of managing the system startup, ongoing operations, and shutdown.

When "telinit 0" is executed, it sends a termination signal to init, instructing it to begin the system shutdown sequence. Init then takes the appropriate actions to stop all processes and services gracefully. The numeric argument "0" specifies the runlevel associated with the shutdown state in most Linux distributions.

Runlevels define the state of the system, indicating which services or daemons should be running. Runlevel 0 is typically reserved for the system halt or shutdown state, where all processes are terminated, and the computer is powered off.

However, it's worth noting that the exact behavior of "telinit 0" can vary depending on the Linux distribution. Some systems might perform a full system shutdown, while others might switch to a lower runlevel where only essential services are running, allowing the system to remain in a powered-on state.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the telinit tool