Как выключить debian 11 через консоль
To shut down a running Debian GNU/Linux system, you must not reboot with the reset switch on the front or back of your computer, or just turn off the computer. Debian GNU/Linux should be shut down in a controlled manner, otherwise files might get lost and/or disk damage might occur. If you run a desktop environment, there is usually an option to “ log out ” available from the application menu that allows you to shutdown (or reboot) the system.
Alternatively you can press the key combination Ctrl + Alt + Del . If the key combinations do not work, a last option is to log in as root and type the necessary commands. Use reboot to reboot the system. Use halt to halt the system without powering it off [18] . To power off the machine, use poweroff or shutdown -h now . The systemd init system provides additional commands that perform the same functions; for example systemctl reboot or systemctl poweroff .
[18] Under the SysV init system halt had the same effect as poweroff , but with systemd as init system (the default since jessie) their effects are different.
Выключение или перезагрузка Debian
В этом руководстве мы покажем вам, как можно перезагрузить или выключить (обесточить) сервер или компьютера на базе Debian из командной строки (Terminal).
Команда выключения Debian
Первым шагом будет открытие Терминала или подключение к системе по SSH. Затем вы выполняете следующую команду для выключения системы.
Команда shutdown выключит систему Debian, её можно отменить, выполнив эту команду:
Если вы хотите немедленно выключить систему, используйте эту команду:
Команда shutdown также может быть использована для перезагрузки сервера или компьютера на базе Debian Linux. Выполните следующую команду:
Использование команды systemctl Debian для перезагрузки или выключения системы
Вместо команды shutdown вы можете использовать systemctl для выключения или перезагрузки системы.
How to Shutdown or Reboot Debian 11

In this guide, we will show you how you can reboot or shut down (power off) a Debian server or desktop from the command line (Terminal).
Debian shutdown command
The first step is that you open the Terminal, or connect to the system by SSH. Then you run the following command to shut down the system.

The shutdown command will power off the Debian system, it can be canceled by running this command:

If you want to immediately power off the system, use this command instead:
The shutdown command can also be used to reboot a Debian Linux server or desktop. Run the following command:

Use Debian systemctl command to reboot or power off a system
Instead of using the shutdown command, you can also use systemctl for powering off or restarting a system.
Tutorial of “shutdown” command on Debian 11 System
As most people know only the GUI way to shutdown Systems but in this Article we will discuss how to shutdown Debian 11 (Linux OS) using the “shutdown” command in the terminal. The shutdown command can be used differently in different situations using “time” and “message” arguments.
Requirement
User should log in as root user
Below different ways are discussed to shut down System using “shutdown” command:
Shutdown Debian 11 Using “shutdown” command
The shutdown command shuts down the system in a secure manner. All users who are logged in and processes are told that the system is shutting down, and no additional logins are permitted.You can select to power off your computer right away or at some other time.
Syntax:
options: These are some shutdown options like power-off (the default option), reboot the system or halt.
time: The shutdown process is started at a specific time specified by the time argument.
message: The message option is used to specify a message that will be aired to all users.
Shut down system without specifying arguments of shutdown command
By running mentioned below command your System will be shutdown using shutdown command:
The system will shut down after 1 minute as the default time is 1 minute.

Now the system will shut down after 1 minute.
Shut down System Immediately using shutdown command
We can shut down our system immediately without waiting for default time of 1 minute using “now” after shutdown command by below mentioned command:

Shut down System after specified time using shutdown command
To shut down system after specified time, we use time argument with shutdown command so its syntax would become:
The time can have two formats; hh:mm set time according to timezone and +m will shut down System after specified minutes.
To shut down System at 11:50 run the below mentioned command:

Output shows that System will shut down at 11:50:00
To shut down System after 5 minutes run the below mentioned command:

Date command shows current time.
Shut down System by sending message using shutdown command
We can also send notification at the time of shutdown by using message argument after time in shutdown command. The mentioned message will be aired at the time of shutdown, run the below mentioned command to broadcast “System update” message with the help of shutdown command:

It will broadcast a message after shutdown command execution.
Reboot System using shutdown command
We can also reboot our system using using “-r” flag after shutdown command as mentioned below:
It will start reboot after default time of “1 minute”

Reboot system by specifying time and sending message using “shutdown” command
We can also fix the time for reboot as we do for shutdown. To reboot System after 3 min by airing “Update System” run the below mentioned command:

This will start reboot after 3 minutes and will display a message before rebooting.
Cancel shut down using “shutdown” command
If you want to cancel your shut down using “shutdown” command, run the below mentioned command:

Shortcuts using “shutdown” command
Conclusion
Every Operating System needs to be shut down after some time. Usually we shutdown the System using GUI but we can also perform this task using Command Line Interface. In the Command Line Interface the “shutdown” command is used to power off the System. In this article “shutdown” command tutorial is provided which explains several uses of “shutdown” command like shutdown after specified time, shutdown by airing message on screen, reboot system using “shutdown” command and how to cancel shut down using “shutdown” command. This write up will guide you to use the shutdown command efficiently.
About the author
Alishba Iftikhar
I am currently an undergraduate student in my 1st year. I am an internee author with Linuxhint and loved learning the art of technical content writing from senior authors. I am looking forward to opting my career as a full time Linux writer after I graduate.