Shutting down the system & wall messages

DEBIANUBUNTUCENTOSLINUXLPIC1-101

2/6/2026

Shutting down the system

Feature shutdown systemctl poweroff init 0

Scheduling Yes (+m or hh:mm) No No

Wall Message Yes No No

Prevent Logins Yes (/run/nologin) No No

Broadcasting a "Wall"(Write all) Message with the "shutdown" command

$ sudo shutdown +15 "Server going down for disk maintenance. Save your work\!"

What happens?

Every user logged into a terminal will see that message pop up on their screen.

The /run/nologin file: Five minutes before the shutdown, the system creates this file. This prevents new users from logging in, while letting current users finish their work.

How to Cancel

If you realize you made a mistake or the maintenance is cancelled: sudo shutdown -c

Note: You can add a message here too, like sudo shutdown -c "False alarm, stay logged in\!"

Difference between a "Hard" power off and an "ACPI" power off.

ACPI Shutdown: Triggered by a signal, allows the OS to run sync, unmount filesystems, and stop services cleanly.

Hard Power Off: Like pulling the plug. No signals are sent; the system just dies.

Key points

ACPI = The standard for hardware power management.

acpid = The daemon that handles events like "Power Button Pressed" or "Laptop Lid Closed."

Clean Exit: Always prefer an ACPI signal over a "Hard Reset" to avoid data loss.

Writing a "Wall" message

$ wall

Hello World!

(Ctrl+D to send the message)

$ mesg

(check if wall messages are enabled)

is y

Note: Wall messages may not work in an environment like the Ubuntu Desktop. Try executing this command in a Virtual terminal instead, for example, with Ctrl+Alt+F3.