--- name: linux-console os: lnx disable-model-invocation: true description: "Use for Linux kernel virtual consoles (/dev/ttyN, Ctrl+Alt+F1): getty, TERM=linux, vconsole.conf, setfont, loadkeys, setterm, fbcon. Not emulators, ptys, tmux, X11, or Wayland." --- # Linux Console ## Scope Use for kernel virtual consoles only: - `/dev/ttyN` - `TERM=linux` - `tty1`, `tty2`, ... - `Ctrl+Alt+F1` / VT switching - `getty`, `vconsole.conf`, `setfont`, `loadkeys`, `setterm`, `fbcon` Do not use for: - graphical terminal emulators - `/dev/pts/*` pseudo-terminals - tmux internals - X11 / Wayland / XKB config ## First Probe Identify the target host and VT from the user's report before probing. The agent's stdin and `TERM` describe its execution context, not necessarily the target console. Run these in the target session, or ask the user for their output there: ```sh tty printf '%s\n' "$TERM" ``` Interpret: - Target `/dev/ttyN` + `TERM=linux` → real VT likely. - Agent `/dev/pts/N` or `not a tty` → target remains unknown; do not reject VT diagnosis. - Target `/dev/pts/N` → pty; clarify whether a separate VT is the actual target. - User reports `tty1`/`tty2` on another session/host → continue target-specific read-only diagnosis. Use `infocmp -1 linux` to inspect console capabilities; it does not detect the target. Do not send console escape sequences to the agent's terminal as a substitute for the target. Missing local man page → fetch current upstream man page. ## Learn Locally First Prefer local truth over memory: ```sh man console_codes | col -b man setterm | col -b man vconsole.conf | col -b man loadkeys | col -b man keymaps | col -b man setfont | col -b man reset | col -b infocmp -1 linux ``` For deeper lookup: `references/research.md`. ## Durable Rules - `TERM=linux` describes Linux-console capabilities via terminfo. - `clear` and `reset` differ; inspect `infocmp -1 linux`. - Linux console interprets control/escape sequences; verify in `console_codes(4)`. - Existing screen cells may need redraw after display/attribute changes. - Keymap, font, palette, and persistence scopes differ; classify first. ## Change Hygiene For every proposed change, state: - target: current VT | all VTs | boot/persistent - mechanism: escape seq | terminfo | kbd tool | system config | ioctl - privilege needs: none | user permissions | root/admin | unknown until probed - rollback/reset path ## Safety - Never apply X11/Wayland/XKB/niri fixes to Linux console. - Never confuse `/dev/ttyN` with `/dev/pts/N`. - Do not change keymaps/fonts/persistent config without explicit user intent. - Prefer `setterm`, `loadkeys`, `setfont`, `vconsole.conf` docs over guesses. ## References Read when needed: - `references/research.md` — fresh docs, command probes, web fallbacks. - `references/model.md` — VT model, terminfo, reset/clear, screen memory. - `references/tools.md` — setterm/loadkeys/setfont/vconsole scope notes.