Created
September 8, 2025 03:31
-
-
Save 4piu/21dfd30c81aaa9ac694320d8b4512212 to your computer and use it in GitHub Desktop.
Disable kernel message output on /dev/ttyS0 once user logged in. Handy if you have to work over TTY. Put this under /etc/profile.d/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$(tty)" = "/dev/ttyS0" ] && [ $(cat /proc/sys/kernel/printk | awk '{print $1}') -gt 1 ]; then | |
echo "Suppressing low-priority kernel messages on serial console." | |
dmesg -n 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment