VT(4)
π VT(4) π
okay so bestie, meet vt β the virtual terminal console driver. She's the whole vibe of your screen, no cap.
β¨ NAME β¨
vt β virtual terminal console driver π
πΈ SYNOPSIS πΈ
Like, here's how you summon her in your kernel config:
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
And 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>"
And in loader.conf(5) or sysctl.conf(5):
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_bell=1
π¦ DESCRIPTION π¦
The vt device gives you multiple virtual terminals and honestly? the feature set is giving main character energy:
- 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 on one single computer. Up to sixteen virtual terminals can be defined. Only 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. iconic, honestly.
π«Ά Copying and Pasting Text with a Mouse
Copying and pasting text from the screen with a mouse is supported, periodt. 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. the way that scrollback just works π
π DRIVER CONFIGURATION π
π Kernel Configuration Options
These kernel options control the vt driver:
TERMINAL_NORM_ATTR=attributeβ changes the default colors used for normal text.TERMINAL_KERN_ATTR=attributeβ changes the default colors used for kernel text.
Both of these use colors defined in <sys/terminal.h>. See βEXAMPLESβ below, bestie. π¨
VT_MAXWINDOWS=Nβ set the number of virtual terminals to be created to N. The value defaults to 12.VT_ALT_TO_ESC_HACK=1β when the Alt key is held down while pressing another key, send an ESC sequence instead of the Alt key.VT_TWOBUTTON_MOUSEβ if defined, swap the functions of mouse buttons 2 and 3. 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 to X.VT_FB_MAX_HEIGHT=Yβ set the maximum height to Y.
π 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 likeβ¦ enjoy them while they last π
vt Option Name sc Option Name
TERMINAL_KERN_ATTR SC_KERNEL_CONS_ATTR
TERMINAL_NORM_ATTR SC_NORM_ATTR
VT_TWOBUTTON_MOUSE SC_TWOBUTTON_MOUSE
VT_MAXWINDOWS MAXCONS
none 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).
hw.vga.textmodeβ set to1to use virtual terminals in text mode instead of graphics mode. Features that require graphics mode, like loadable fonts, will be disabled. π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.kern.vtyβ set this value to βvtβ or βscβ to choose a specific system console, overriding the default. TheGENERICkernel usesvtwhen this value is not set. πkern.vt.color.colornum.rgbβ set this value to override default palette entry for color colornum which should be in a range from 0 to 15 inclusive. The value should be either a comma-separated triplet of red, green, and blue values in a range from 0 to 255 or HTML-like hex triplet. See βEXAMPLESβ below. π¨kern.vt.fb.default_modeβ set this value to a graphic mode to override the default mode 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 mode picked by thevtbackend. This mode is applied to the output connector connector_name only. 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.
π 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. so flexible fr fr
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.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
π EXAMPLES π
This example changes the default color of normal text to green on a black background, or black on a green background when reversed. Note that white space cannot be used inside the attribute string because of the current implementation of config(8). π
options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)
This line changes the default color of kernel messages to be bright red on a black background, or black on a bright red background when reversed.
options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK)
To set a 1024x768 mode on all output connectors, put the following line in /boot/loader.conf:
kern.vt.fb.default_mode="1024x768"
To set a 800x600 only on a laptop builtin screen, use the following line instead:
kern.vt.fb.modes.LVDS-1="800x600"
The connector name was found in dmesg(8):
info: [drm] Connector LVDS-1: get mode from tunables:
info: [drm] - kern.vt.fb.modes.LVDS-1
info: [drm] - kern.vt.fb.default_mode
To set black and white colors of console palette π€π€
kern.vt.color.0.rgb="10,10,10"
kern.vt.color.15.rgb="#f0f0f0"
π«Ά 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), rc.conf(5), ttys(5), config(8), getty(8), kldload(8), moused(8), vtfontcvt(8)
πΈ HISTORY πΈ
The vt driver first appeared in FreeBSD 9.3. a legend since day one π
π 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>. kings, all of them π
β οΈ CAVEATS β οΈ
Paste buffer size is limited by the system value{MAX_INPUT}, the number of bytes that can be stored in the terminal input queue, usually 1024 bytes (seetermios(4)). so don't go pasting your whole novel in there bestie π
and that's the whole page, bestie!! π this one's from the Debian crew, dated June 4, 2020, filed under VT(4) β go forth and terminal πβ¨π¦
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2014 Warren Block
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms