MTM(1)
π MTM(1) β micro-terminal multiplexer, bestie edition π
πΈ NAME πΈ
Okay bestie, welcome to the General Commands Manual page for mtm β a micro-terminal multiplexer. Thatβs the whole name, no cap. π«Ά
β¨ SYNOPSIS β¨
mtm [-T HOST] [-t TERM] [-c CHARACTER]
π DESCRIPTION π
So like, mtm is a terminal multiplexer β literally a program that lets multiple terminal sessions run inside one single (physical or virtual) terminal session. Multiple terminals, one window, main character energy. π
The options are:
-T HOSTβ assume the host terminal (i.e. the terminal under whichmtmis running) is of typeHOST. By default, the contents of theTERMenvironment variable are used.-t TERMβ set theTERMenvironment variable inside themtmsession toTERM. By default, this isscreen-bce, orscreen-256color-bceifmtmdetects that the host terminal supports 256 colors. Heads up: this default can be changed at compile time, so it might differ in your installation. π-c CHARACTERβ commands are prefixed usingCHARACTERin combination with the βcontrolβ key. By default this is βgβ. Also: this default can be changed at compile time, so your installation may differ. β¨
π Usage π
mtm divides the screen into multiple virtual terminals. Each virtual terminal is updated and accessed independently. At any given time, exactly one virtual terminal is βfocusedβ β meaning it receives any typed characters. The currently-focused terminal is indicated by the location of the cursor. Cursor location is basically the focus ring, iykyk. π
While running, the following keys are recognized as commands to mtm when prefixed with the command character:
- Up/Down/Right/Left Arrow β select the terminal above/below/to the right of/to the left of the currently focused one.
oβ (the letter oh) switch to the last-focused terminal.horvβ split the focused terminal in half and stack horizontally (for'h') or stack vertically (for'v'); the newly-created terminal will be focused.wβ delete the currently focused terminal.lβ (the letter ell) redraw the screen.- PgUp/PgDown/End β scroll the terminal up/down/to the bottom. By default,
mtmstores up to1000lines of scrolling history. Note that if the screen is currently scrolled back (that is, the scrollback buffer is not at the bottom), these keys need not be prefixed with the command key.mtmwill also scroll to the bottom on user input. π
Note that these command keys can be changed at compile time, and therefore may be different for this installation of mtm.
mtm will exit when its last virtual terminal is closed.
π¦ The Value of -t π¦
The terminal name passed to -t does not change how mtm interprets command sequences β it changes what kind of terminal mtm claims to be. Safe bets for this value are:
mtmβ this is the terminal described by themtm.titerminfo(5)description that shipped withmtm. It is not necessarily installed on your system, but if it is, it will tellterminfo(5)-aware programs how to use all of themtmfeatures. Note that there arenβt any user-visible features added here, butmtmsupports some extra cursor-movement commands, and thus using this terminal type where available may result in slightly speedier screen updates. β‘mtm-256colorβ this is the same as themtmterminal type, but advertising 256-color support. This can be used if themtmterminfo(5)description is installed and the host terminal supports 256 or more colors. πscreen-bceβ this is the default if 256-color support is not detected. It is widely supported and its description is installed by default on most systems. This is a good choice if themtmterminfo(5)description is not installed everywhere you expect to usemtm.screen-bce-256colorβ this is the default if 256-color support is detected. The same advice given forscreen-bceabove applies here too.
π§ The mtm Environment π§
mtm sets the MTM environment variable to its process ID (see getpid(2)). Programs can test for the presence of this variable to determine if they are running inside of a mtm instance. Itβs giving βare we in the multiplexer or notβ realness. π«§
π ENVIRONMENT π
The following environment variables affect the operation of mtm:
TERMβ names the hosting terminalβs type. This can be overridden using the-Toption.ESCDELAYβ this variable specifies the number of millisecondsmtmwill wait after seeing an escape character for a special character sequence to complete. By default this is1000(one second). β³LC_CTYPELC_ALLLANGβ these variables are consulted to determine the encoding used for textual data. π§¬SHELLβ if set,mtmwill launch the program named by this command in new virtual terminals. If this is unset,mtmwill use the value of the βcommand interpreterβ field of the password database (seepasswd(5)) if available, and will finally fall back to/bin/sh.
π SEE ALSO π
π BUGS π
mtm will attempt to fit all virtual terminals in the window at once. If many terminals are created and the containing window is shrunk too small, the display will be suboptimal. π Not a slay, just a layout limitation.
The only human language in which output is generated and in which documentation is available is English, regardless of the userβs preferred language.
β shipped by Debian, dated $Mdocdate$, and this was MTM(1); now go multiplex something cute, bestie ππ
π¦ where this page comes from
- alpine 3.24: mtm-doc 1.2.1-r1 Β· GPL-3.0-or-later
- nixos 26.05: mtm 1.2.1
- nixpkgs unstable: mtm 1.2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms