ioctl_console(2)

πŸ’… ioctl_console β€” the manual page for ioctl_console(2)

okay bestie, welcome to the Linux System Calls Manual, section 2, where we talk about ioctl_console β€” the ioctls for console terminals and virtual consoles. yes it's real, yes it's niche, yes we're doing this together. grab a snack πŸ“


🌸 NAME 🌸

ioctl_console β€” bestie, it's the ioctls for the console terminal and virtual consoles ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <sys/ioctl.h>

int ioctl(int fd, unsigned long op, ...);

πŸ‘‘ DESCRIPTION πŸ‘‘

So the vibes here are: these are the Linux-specific ioctl(2) operations that are supported for console terminals and virtual consoles. That's the whole plot. πŸ’«

The icons in this group all live over in ioctl_kd(2), and they are, in order:

…and the whole lil squad above? yeah, see ioctl_kd(2). πŸ‘€

Then, standing on its own with main character energy:

And then the VT crew, also in order, no cap:

…and for all of those, see ioctl_vt(2). 🧚


πŸ’– RETURN VALUE πŸ’–

  • Slay: returns 0 on success β€” except where indicated, so like, read the fine print bestie.
  • Not slay: returns -1 on failure, and errno gets set to tell you what the error was. 😭

⭐ STANDARDS ⭐

Linux. that's it, that's the standard. πŸ’…

πŸ”₯ CAVEATS πŸ”₯

Not me being the messenger here, but do not treat this man page as actual documentation of the Linux console ioctls. πŸ™ˆ

It's provided for the curious only β€” like, as an alternative to reading the source. Ioctls are undocumented Linux internals, and they are liable to be changed without warning. Fr fr. And honestly? This page more or less describes the situation as of kernel version 1.1.94 β€” there are many minor and not-so-minor differences with earlier versions. πŸ’€

Also, super often, ioctls get introduced just for communication between the kernel and one particular well-known program β€” think fdisk, hdparm, setserial, tunelp, loadkeys, selection, setfont, etc. β€” and their behavior will be changed when that particular program requires it. So yeah. It's giving "custom-built for one guy". 🫢

🌈 SEE ALSO 🌈

ioctl(2), TIOCLINUX(2const), ioctl_kd(2), ioctl_vt(2), dumpkeys(1), kbd_mode(1), loadkeys(1), mknod(1), setleds(1), setmetamode(1), execve(2), fcntl(2), ioctl_tty(2), ioperm(2), console_codes(4), mt(4), sd(4), tty(4), ttyS(4), vcs(4), vcsa(4), charsets(7), termios(7), mapscrn(8), resizecons(8), setfont(8)


and that's the whole page bestie, love that for us πŸ’œ this cutie came from Linux man-pages 6.20, dated 2026-07-02. periodt. πŸŽ€

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: GPL-2.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms