Quickly Disable Broadcast Messages on Debian 12

Published at Apr 14, 2023

#debian#administration

TL;DR

Sometimes when you do a lot of maintenance on Linux systems, you will see weir broadcasting messages. These messages can interfere with your work. In this blog post, I provide a quick fix for them.

Debian Logo

If you ever see a message like this:


Broadcast message from 
name@host (Thu 2023-12-07 11:48:38 CET):
The system will suspend now!

I got your back!


The Solution

Create


sudo nano /etc/systemd/sleep.conf.d/nosuspend.conf

Insert


[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
And the common

sudo systemctl daemon-reload

… Aaaand it’s gone.

Helpful Resources

https://forums.debian.net/viewtopic.php?t=156005