Mirror kernel printk to a chosen virtual console and control what you see. 03.12.2025 | reading time: 3 min Kernel messages are useful when diagnosing boot or hardware problems; you can make them appear on a virtual console by mirroring the kernel stream into a tty or by changing kernel console settings. Live mirror example Try this on a test machine to see kernel output on tty2: run `sudo journalctl -kf --output=cat > /dev/tty2 &` then trigger a kernel message for testing with `sudo sh -c 'echo 1 > /proc/sys/kernel/sysrq'` or watch normal events and observe lines like `[ 123.456789] usb 1-1: new high-speed USB device` appearing on the second virtual console; stop the background mirror with `sudo pkill -f "journalctl -kf --output=cat > /dev/tty2"`. Quick alternate method If you prefer the ring buffer approach use `sudo dmesg -wH > /dev/tty2 &` which follows new printk output and prints it nicely formatted; remember both approaches require root because writing to `/dev/ttyN` is privileged. Tune what appears Limit verbosity with `sudo dmesg -n 4` or `sudo sysctl -w kernel.printk='4 4 1 7'` to keep only important messages on the console and avoid flooding the tty; adjust boot-time targets with a kernel command line like `console=tty1` in your GRUB configuration when you need the kernel itself to bind a console early at boot. Make mirroring persistent Create a small systemd service that runs `journalctl -kf --output=cat > /dev/tty2` at boot or add a screen/tmux session for a long-lived mirror; ensure unit files run as root and consider file permissions to avoid exposing sensitive logs to unprivileged users. Safety and pitfalls Be careful when dumping logs to a busy virtual console because high-volume output can interfere with interactive shells and leak sensitive information; prefer read-only mirrors for remote troubleshooting and use rate limiting or message levels to protect system stability. Companion tools Use `dmesg` to read the ring buffer, `journalctl` for systemd systems, and `rsyslog` or `syslog-ng` to route or archive kernel messages before deciding which tty to mirror to. Final step Redirecting kernel logs to a tty is a quick, practical trick for on-box troubleshooting and boot-time debugging; experiment with live mirroring and kernel parameters, then deepen your skills and consider formal certification like CompTIA Linux+ or LPIC-1 with intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. utilities boot-process troubleshooting scripting