ioctl_console(2)

πŸ’… ioctl_console(2) β€” the console ioctl situation, bestie

okay so this lives in the System Calls Manual section (section 2, the syscall girlies) and it's about ioctl stuff for console terminals and virtual consoles. Linux-specific. No cap. Let's get into it 🫢


🌸 NAME 🌸

ioctl_console β€” the ioctls for console terminals and virtual consoles πŸ’–


✨ SYNOPSIS ✨

#include <sys/ioctl.h>

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

πŸŽ€ DESCRIPTION πŸŽ€

So the following Linux-specific ioctl(2) operations are supported for console terminals and virtual consoles. That's the whole vibe. Here's the roster πŸ‘‘

the kd crew (aka the ones you go read ioctl_kd(2) for)

See ioctl_kd(2). like, all of them. go there. πŸ’…

πŸ¦‹ the solo one

🌈 the VT squad

See ioctl_vt(2). same energy, different file. ✨

πŸ’– RETURN VALUE πŸ’–

On success, 0 comes back at you (except where indicated β€” sometimes it's different, pay attention bestie). On failure, -1 returns and errno gets set to tell you what went wrong. as it should. 😭


πŸ‘‘ STANDARDS πŸ‘‘

Linux. that's it, that's the standard. periodt. 🌸


πŸ’€ CAVEATS πŸ’€

okay this is the part where I hold your hand because it MATTERS.

Do not treat this man page as documentation of the Linux console ioctls. This is here for the curious only β€” it's an alternative to just going and reading the source. Ioctls are undocumented Linux internals, and they are liable to be changed without warning. (And fr fr, 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. so like, yikes.)

Also β€” and this is the tea β€” very often ioctls get introduced for communication between the kernel and one particular well-known program (fdisk, hdparm, setserial, tunelp, loadkeys, selection, setfont, etc.), and their behavior will be changed whenever that particular program requires it. so the ioctl answers to its favorite child, not to you. 🀑


πŸ”₯ 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 thing, bestie ✨ this was Linux man-pages 6.20, dated 2026-07-02. go forth and ioctl responsibly, mwah πŸ’…πŸ’–πŸŽ€

πŸ“¦ 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