vt_kmsg_redirect(9)
π vt_kmsg_redirect(9) π
πΈ NAME πΈ
vt_kmsg_redirect β sets/gets the kernel message console. yes bestie, this is the Kernel API Manual entry for vt_kmsg_redirect(9), and it's giving βtiny function, very specific jobβ energy. π
β¨ SYNOPSIS β¨
int vt_kmsg_redirect (int new );
π ARGUMENTS π
newβ the new virtual terminal number or-1if the console should stay unchanged. that's the whole argument, bestie π«Ά
π DESCRIPTION π
okay so by default, the kernel messages are always printed on the current virtual console. but the user may modify that default with the TIOCL_SETKMSGREDIRECT ioctl call. no cap, that's the official switch-up. β¨
this function sets the kernel message console to be new. it returns the old virtual console number. think βset it, then hand back the previous oneβ energy. π
the virtual terminal number 0 β both as parameter and return value β means no redirection (i.e. always printed on the currently active console). so 0 is literally βno redirect, bestie.β π
the parameter -1 means that only the current console is returned, but the value is not modified. you may use the macro vt_get_kmsg_redirect in that case to make the code more understandable. iykyk, it's the polite βjust peek, don't touchβ move. π
when the kernel is compiled without CONFIG_VT_CONSOLE, this function ignores the parameter and always returns 0. that's the whole exception, periodt. π
bestie reminder:0= no redirection, and-1= only return the current console without modifying the value. iconic behavior, honestly. π
π¦ SEE ALSO π¦
Kernel file: ./drivers/tty/vt/vt.c β yes, that's the file dropped right in the refs. and here's the whole squad:
vc_font_pitch(9)vc_font_size(9)vc_do_resize(9)__vc_resize(9)vt_resize(9)enum vc_ctl_state(9)vc_sanitize_unicode(9)vc_translate_unicode(9)con_is_bound(9)con_is_visible(9)con_debug_enter(9)con_debug_leave(9)do_unregister_con_driver(9)
k bye bestie π β source/version: ./drivers/tty/vt, date: October 2026, and it's still the vt_kmsg_redirect(9) manual. mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms