Skip to main content

Julia Evans

« back to all TILs

Two kinds of terminal modes: termios and ANSI

I learned recently that the terminal has two different kinds of modes that can be set:

  1. “termios” modes, which
    • are managed by the operating system
    • you can view with stty -a
    • are set with the ioctl system call
  2. “ANSI” modes (not sure if this is the right name), which
    • are managed by the terminal emulator
    • you can’t normally view, except in GhostTTY’s inspector
    • are set by sending ANSI escape codes (like "\033[?25l" for “make cursor invisible”)