/plushcap/analysis/warp/what-happens-when-you-open-a-terminal-and-enter-ls

What happens when you open a terminal and enter ‘ls’

What's this blog post about?

This text delves into the intricate workings of terminal emulators, from their historical roots in teletypes to modern applications. It explains how opening a terminal involves spawning a shell process and creating a PTY (pseudo-TTY) for communication between the terminal and the shell. The text also explores the process of running commands within the terminal, including tokenization, parsing, and execution. Additionally, it discusses escape sequences used to control terminal output, such as colors and bolding. Overall, this detailed account provides a comprehensive understanding of how terminals function behind the scenes.

Company
Warp

Date published
Jan. 11, 2023

Author(s)
Suraj Gupta & Andy Carlson

Word count
4308

Hacker News points
156

Language
English


By Matt Makai. 2021-2024.