VT(4)
π NAME π
okay bestie, meet vt β the virtual terminal system video console driver. That's VT(4), from the Kernel Interfaces Manual, and she's basically the main character of your console setup. π
β¨
β¨ SYNOPSIS β¨
Here's the config spellbook, fr fr. Kernel options first:
options TERMINAL_KERN_ATTR=β¨attributeβ©
options TERMINAL_NORM_ATTR=β¨attributeβ©
options VT_MAXWINDOWS=β¨Nβ©
options VT_ALT_TO_ESC_HACK=1
options VT_TWOBUTTON_MOUSE
options VT_FB_MAX_WIDTH=β¨Xβ©
options VT_FB_MAX_HEIGHT=β¨Yβ©
options SC_NO_CUTPASTE
device vt
In loader.conf(5):
hw.vga.textmode=1
hw.vga.acpi_ignore_no_vga=1
kern.vty=vt
kern.vt.color.β¨colornumβ©.rgb=β¨colorspecβ©
kern.vt.fb.default_mode=β¨Xβ©xβ¨Yβ©
kern.vt.fb.modes.β¨connectorβ©=β¨Xβ©xβ¨Yβ©
kern.vt.slow_down=β¨delayβ©
screen.font=β¨Xβ©xβ¨Yβ©
In loader.conf(5) or sysctl.conf(5):
kern.consmute=1
kern.vt.kbd_halt=1
kern.vt.kbd_poweroff=1
kern.vt.kbd_reboot=1
kern.vt.kbd_debug=1
kern.vt.kbd_panic=0
kern.vt.enable_altgr=0
kern.vt.enable_bell=1
π DESCRIPTION π
The vt device provides multiple virtual terminals with an extensive feature set:
- Unicode UTF-8 text with double-width characters. π¦
- Large font maps in graphics mode, including support for Asian character sets.
- Graphics-mode consoles.
- Integration with KMS (Kernel Mode Setting) video drivers for switching between the X Window System and virtual terminals.
π¦ Virtual Terminals π¦
Multiple virtual terminals are provided on a single computer. Up to sixteen virtual terminals can be defined. A single virtual terminal is connected to the screen and keyboard at a time. Key combinations are used to select a virtual terminal. Alt-F1 through Alt-F12 correspond to the first twelve virtual terminals. If more than twelve virtual terminals are created, Shift-Alt-F1 through Shift-Alt-F4 are used to switch to the additional terminals.
π Copying and Pasting Text with a Mouse π
Copying and pasting text from the screen with a mouse is supported. Press and hold down mouse button 1, usually the left button, while moving the mouse to select text. Selected text is highlighted with reversed foreground and background colors. To select more text after releasing mouse button 1, press mouse button 3, usually the right button. To paste text that has been selected, press mouse button 2, usually the middle button. The text is entered as if it were typed at the keyboard. The VT_TWOBUTTON_MOUSE kernel option can be used with mice that only have two buttons. Setting this option makes the second mouse button into the paste button. See moused(8) for more information.
π Scrolling Back π
Output that has scrolled off the screen can be reviewed by pressing the Scroll Lock key, then scrolling up and down with the arrow keys. The Page Up and Page Down keys scroll up or down a full screen at a time. The Home and End keys jump to the beginning or end of the scrollback buffer. When finished reviewing, press the Scroll Lock key again to return to normal use. Some laptop keyboards lack a Scroll Lock key, and use a special function key sequence (such as Fn + K) to access Scroll Lock.
π οΈ DRIVER CONFIGURATION π οΈ
βοΈ Kernel Configuration Options βοΈ
These kernel options control the vt driver. Obsessed with how many knobs there are, honestly.
TERMINAL_NORM_ATTR=β¨attributeβ©β changes the default colors used for normal text.TERMINAL_KERN_ATTR=β¨attributeβ©β changes the default colors used for kernel text. Available colors are defined in<sys/terminal.h>. See EXAMPLES below.VT_MAXWINDOWS=β¨Nβ©β set the number of virtual terminals to be created toN. The value defaults to12.VT_ALT_TO_ESC_HACK=1β when theAltkey is held down while pressing another key, send anESCsequence instead of theAltkey.VT_TWOBUTTON_MOUSEβ if defined, swap the functions of mouse buttons2and3. In effect, this makes the right-hand mouse button perform a paste. These options are checked in the order shown.SC_NO_CUTPASTEβ disable mouse support.VT_FB_MAX_WIDTH=β¨Xβ©β set the maximum width toX.VT_FB_MAX_HEIGHT=β¨Yβ©β set the maximum height toY.
π BACKWARDS COMPATIBILITY π
Several options are provided for compatibility with the previous console device, sc(4). These options will be removed in a future FreeBSD version. So yes, they're giving legacy era, bestie.
Here's the translation map β vt option name on the left, sc option name on the right:
TERMINAL_KERN_ATTRβSC_KERNEL_CONS_ATTRTERMINAL_NORM_ATTRβSC_NORM_ATTRVT_TWOBUTTON_MOUSEβSC_TWOBUTTON_MOUSEVT_MAXWINDOWSβMAXCONSnoneβSC_NO_CUTPASTE
π START-UP OPERATION WITH X86 BIOS SYSTEMS π
The computer BIOS starts in text mode, and the FreeBSD loader(8) runs, loading the kernel. If hw.vga.textmode is set, the system remains in text mode. Otherwise, vt switches to 640x480x16 VGA mode using vt_vga. If a KMS (Kernel Mode Setting) video driver is available, the display is switched to high resolution and the KMS driver takes over. When a KMS driver is not available, vt_vga remains active.
π LOADER TUNABLES π
These settings can be entered at the loader(8) prompt or in loader.conf(5). Pop off. π
hw.vga.textmodeβ set to1to use virtual terminals in text mode instead of graphics mode on BIOS boot. Features that require graphics mode, like loadable fonts, will be disabled. If a KMS driver is loaded the console will switch to, and remain in, graphics mode. Moreover this tunable has no effect withUEFI(8)boot because it does not use VGA mode.hw.vga.acpi_ignore_no_vgaβ set to1to force the usage of the VGA driver regardless of whether ACPIIAPC_BOOT_ARCHsignals no VGA support. Can be used to workaround firmware bugs in the ACPI tables. Note no VGA support is only acknowledged when running virtualized. There is too many broken firmware that wrongly reports no VGA support on physical hardware.kern.vtyβ set this value tovtorscto choose a specific system console, overriding the default. TheGENERICkernel usesvtwhen this value is not set. Note thatscis not compatible withUEFI(8)boot.kern.vt.color.colornum.rgbβ set this value to override default palette entry for colorcolornum, which should be in a range from0to15inclusive. The value should be either a comma-separated triplet of red, green, and blue values in a range from0to255or HTML-like hex triplet. See EXAMPLES below. Note: ThevtVGA hardware driver does not support palette configuration.kern.vt.fb.default_modeβ set this value to a graphic mode to override the default picked by thevtbackend. The mode is applied to all output connectors. This is currently only supported by thevt_fbbackend when it is paired with a KMS video driver.kern.vt.fb.modes.β¨connector_nameβ©β set this value to a graphic mode to override the default picked by thevtbackend. This mode is applied to the output connectorconnector_nameonly. It has precedence overkern.vt.fb.default_mode. The names of available connector names can be found indmesg(8)after loading the KMS driver. It will contain a list of connectors and their associated tunables. This is currently only supported by thevt_fbbackend when it is paired with a KMS video driver.kern.vt.slow_downβ when debugging the kernel on modern laptops, the screen is often the only available console, and relevant information will scroll out of view before it can be captured by eye or camera. Settingkern.vt.slow_downto a non-zero number will make console output synchronous (ie: not dependent on timers and interrupts) and slow it down in proportion to the number.screen.fontβ set this value to the base name of the desired font file located in/boot/fonts. The font must be specified in theINDEX.fontsfile located there. Fonts can be converted for use withvtfontcvt(8).
β¨οΈ KEYBOARD SYSCTL TUNABLES β¨οΈ
These settings control whether certain special key combinations are enabled or ignored. The specific key combinations can be configured by using a keymap(5) file.
These settings can be entered at the loader(8) prompt or in loader.conf(5) and can also be changed at runtime with the sysctl(8) command.
kern.vt.enable_altgrβ enableAltGrkey (do not assume rightAltkey asAlt).kern.vt.kbd_haltβ enable halt keyboard combination.kern.vt.kbd_poweroffβ enable power off key combination.kern.vt.kbd_rebootβ enable reboot key combination, usuallyCtrl+Alt+Del.kern.vt.kbd_debugβ enable debug request key combination, usuallyCtrl+Alt+Esc.kern.vt.kbd_panicβ enable panic key combination.
π§Έ OTHER SYSCTL TUNABLES π§Έ
These settings can be entered at the loader(8) prompt, set in loader.conf(5), or changed at runtime with sysctl(8).
kern.consmuteβ disable printing kernel messages to the system console.kern.vt.enable_bellβ enable the terminal bell.
π FILES π
/dev/console/dev/consolectl/dev/ttyv*β virtual terminals/etc/ttysβ terminal initialization information/usr/share/vt/fonts/*.fntβ console fonts/usr/share/vt/keymaps/*.kbdβ keyboard layouts
π‘ DEVCTL MESSAGES π‘
Here's the devctl message tea, no table because we're keeping it cute:
- System
VT, SubsystemBELL, TypeRINGβ notification that the console bell has rung.
Variables and what they mean:
duration_msβ length of time the bell was requested to ring in milliseconds.enabledβtrueorfalseindicating whether or not the bell was administratively enabled when rung.hushedβtrueorfalseindicating whether or not the bell was quieted by the user when rung.hzβ tone that was requested in Hz.
β¨ EXAMPLES β¨
Bestie, this is the fun part β actual copy-paste-able glow-ups π
Wanna make your scrollback buffer hold 22500 lines? Say less. Drop this line into /etc/rc.conf:
allscreens_flags="-h 22500"
Obsessed. Now you can scroll back through your whole entire life.
This next one changes the default color of normal text to green on a black background β or black on a green background when reversed. Cute, right? But heads up π«Ά: white space cannot be used inside the attribute string, because of how config(8) is currently implemented. So no pretty spacing, sorry babe.
options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)
And this line makes the default color of kernel messages bright red on a black background β or black on a bright red background when reversed. Very "something is wrong" energy, honestly iconic π₯
options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK)
Want a 1024x768 mode on all the output connectors? Slap this into /boot/loader.conf:
kern.vt.fb.default_mode="1024x768"
But if you're on a laptop and you only want 800x600 on the builtin screen, use this one instead β very main character, very specific β¨
kern.vt.fb.modes.LVDS-1="800x600"
The connector name was found in dmesg(8), and it literally looks like this:
info: [drm] Connector LVDS-1: get mode from tunables:
info: [drm] - kern.vt.fb.modes.LVDS-1
info: [drm] - kern.vt.fb.default_mode
Setting black and white colors of the console palette? We love a monochrome moment π€π€
kern.vt.color.0.rgb="10,10,10"
kern.vt.color.15.rgb="#f0f0f0"
And finally, load the 8x16 font in loader.conf(5) from /boot/fonts/*.fnt[.gz] at boot β font glow-up era:
screen.font="8x16"
π SEE ALSO π
kbdcontrol(1), login(1), vidcontrol(1), atkbd(4), atkbdc(4), kbdmux(4), keyboard(4), screen(4), splash(4), syscons(4), ukbd(4), kbdmap(5), loader.conf(5), rc.conf(5), ttys(5), config(8), getty(8), kldload(8), moused(8), vtfontcvt(8)
Go read them, iykyk π
π¦ HISTORY π¦
The vt driver first appeared in FreeBSD 9.3. Ancient history but make it fashion π
π AUTHORS π
The vt device driver was developed by Ed Schouten <ed@FreeBSD.org>, Ed Maste <emaste@FreeBSD.org>, and Aleksandr Rybalko <ray@FreeBSD.org>, with sponsorship provided by the FreeBSD Foundation. This manual page was written by Warren Block <wblock@FreeBSD.org>. Legends, all of them π«Άβ¨
π CAVEATS π
Okay so this part matters, ngl. The paste buffer size is limited by the system value {MAX_INPUT} β that's the number of bytes that can be stored in the terminal input queue, usually 1024 bytes (see termios(4)).
So don't go pasting your entire fanfic into the terminal and expect it to all land. It will simply not. π
That's the whole page, bestie β you made it to the end π Written under the Debian banner, dated November 21, 2025, and filed under VT(4). Slay, go forth and console πΈ
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- Copyright (c) 2014 Warren Block
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms