RESIZECONS(8)
๐ resizecons(8) โ bestie edition ๐
okay so this one lives in the System Manager's Manual, it's called resizecons, and it's about to change your whole console situation. literally. ๐ธ
โจ NAME โจ
resizecons โ change kernel idea of the console size ๐ฆ
like, the kernel's opinion about how big your console is. we're gaslighting the kernel (affectionately). ๐
๐ SYNOPSIS ๐
resizecons COLSxROWS
resizecons -lines ROWS
two ways in, bestie. pick your fighter. ๐
๐ซ DESCRIPTION ๐ซ
The resizecons command tries to change the videomode of the console. and there's likeโฆ several aspects to this, because of course there are:
- (a) the kernel must know about it
- (b) the hardware must know about it
- (c) user programs must know about it
- (d) the console font may have to be adapted
four whole problems. four. it's giving "group project where everyone has to pull their weight". ๐ญ
(a) the kernel situation ๐ง
The kernel gets told about the change using the ioctl VT_RESIZE. This makes the kernel reallocate console screen memory for all virtual consoles, and ngl it might fail if there is not enough memory. (in that case? try to disallocate some virtual consoles first, babe. free up that real estate. ๐ )
โ ๏ธ and here's the messy part: if this ioctl succeeds, but a later step fails (e.g., because you do not have root permissions), you may be left with a very messy screen. like, screen all glitched out. tragic. ๐
(b) the hardware situation ๐ฅ๏ธ
The most difficult part of this is (b), since it requires detailed knowledge of the video card hardware, and the setting of numerous registers. like, numerous. many. a lot. ๐
Only changing the number of rows is slightly easier, and resizecons will try to do that itself, when given the -lines option. (Probably, root permission will be required.) slay, but also: root, bestie. ๐
The command resizecons COLSxROWS will execute restoretextmode -r COLSxROWS (and hence requires that you have svgalib installed). Here COLSxROWS is a file that was created earlier by restoretextmode -w COLSxROWS. Again, either root permissions are required, or restoretextmode has to be suid root. no cap. ๐
(c) the user programs situation ๐ฃ
In order to deal with (c), resizecons does a stty rows ROWS cols COLS for each active console (in the range tty0..tty15), and sends a SIGWINCH signal to selection if it finds the file /tmp/selection.pid. yes, it's out here notifying everyone. it's giving "announcement in the group chat". ๐ซถ
(d) the font situation ๐
Finally, (d) is dealt with by executing a setfont command. Most likely, the wrong font is loaded, and you may want to do another setfont yourself afterwards. so likeโฆ it tries its best, but you might need to clean up after it. ๐ญ iconic behaviour honestly.
๐ฅ BUGS ๐ฅ
resizecons does not work on all hardware. fr fr, not every setup is gonna vibe with this. ๐ฆ
also, fun lore drop: This command used to be called resize, but was renamed to avoid conflict with another command with the same name. two resizes could never coexist. main character energy only. ๐
๐ SEE ALSO ๐
setfont(8)stty(1)selection(1)restoretextmode(8)disalloc(8)
go read those too, bestie, they're all part of the lore. ๐โจ
kbd package, dated 17 Jan 1995 โ yeah this one's vintage, a true classic, and she still ate. ๐๐โจ
๐ฆ where this page comes from
- alpine 3.22: kbd-doc 2.7.1-r1 ยท GPL-2.0-or-later
- alpine 3.23: kbd-doc 2.8.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: kbd-doc 2.8.0-r0 ยท GPL-2.0-or-later
- arch rolling: kbd 2.10.0-1 ยท GPL-2.0-or-later
- centos-stream 10: kbd 2.6.4-8.el10 ยท GPL-2.0-or-later
- centos-stream 9: kbd 2.4.0-12.el9 ยท GPLv2+
- fedora 43: kbd 2.8.0-3.fc43 ยท GPL-2.0-or-later
- fedora 43: kbd 2.8.0-4.fc43 ยท GPL-2.0-or-later
- fedora 44: kbd 2.9.0-3.fc44 ยท GPL-2.0-or-later
- fedora 44: kbd 2.9.0-4.fc44 ยท GPL-2.0-or-later
- nixos 26.05: kbd 2.9.0
- nixos 26.05: kbd-vlock 2.9.0
- nixpkgs unstable: kbd 2.9.0
- nixpkgs unstable: kbd-vlock 2.9.0
- opensuse-leap 16.0: kbd 2.7.1-160000.3.1 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms