# A Brief Introduction to termios: termios(3) and stty

DevFeed: [A Brief Introduction to termios: termios(3) and stty](<https://devfeed.tech/articles/a-brief-introduction-to-termios-termios-3-and-stty-21891.md>)

Original publisher: [Read original article](<https://blog.nelhage.com/2009/12/a-brief-introduction-to-termios-termios3-and-stty/>)

Author: Nelson Elhage

Published: 2009-12-30T01:47:17Z

Content type: tutorial

Language: en

Sources: [Nelson Elhage](<https://devfeed.tech/sources/nelson-elhage.md>)

Topics: [Unix](<https://devfeed.tech/topics/unix.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [POSIX](<https://devfeed.tech/topics/posix.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [posix](<https://devfeed.tech/tags/posix.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [unix](<https://devfeed.tech/tags/unix.md>), [vim](<https://devfeed.tech/tags/vim.md>)

## AI overview

This tutorial explains how UNIX termios interfaces control the behavior of terminals and pseudo-terminals. It covers terminal settings such as canonical mode, echoing, signal generation, and flow control, including how these settings affect programs such as emacs, vim, and bash.

## Source excerpt

(This is part two of a multi-part introduction to termios and terminal emulation on UNIX. Read part 1 if you're new here) In this entry, we'll look at the interfaces that are used to control the behavior of the "termios" box sitting between the master and slave pty. The behaviors I described last time are fine if you have a completely dumb program talking to the terminal, but if the program over on the right is using curses (like emacs or vim), or even just readline (like bash), it will want to disable or customize some of the behaviors.