# Operating system commands

> Text-carrying commands for things outside the screen grid, such as the window title and the colors.

Text-carrying commands for things outside the screen grid: the window title,
the colors, and more. ECMA-48 defines only the frame, `OSC`, a string, and
`ST`; what goes in the string was left to each system. Nearly all the numbers
in use are xterm's, and a terminal that has them follows xterm's meaning.

- [OSC 4: Change Color Palette](https://control-codes.page/osc/palette/index.html.md): Set, query and reset the colors that SGR's color numbers stand for.
- [OSC 10: Change Dynamic Colors](https://control-codes.page/osc/dynamic/index.html.md): Set, query and reset the default foreground and background, the cursor's color, and others.
- [OSC 52: Manipulate Selection Data](https://control-codes.page/osc/clipboard/index.html.md): Let a program set or read the clipboard, even over ssh.
- [OSC 3008: Hierarchical Context Signalling](https://control-codes.page/osc/context/index.html.md): Tell the terminal when a shell, a command, a container or a privileged session starts and ends.
- [OSC 9: Desktop Notification](https://control-codes.page/osc/notify/index.html.md): Ask the terminal to show a desktop notification.
- [OSC 8: Hyperlink](https://control-codes.page/osc/hyperlink/index.html.md): Make text a link, the way an anchor does in HTML.
- [OSC 1337: iTerm2 Extensions](https://control-codes.page/osc/iterm2/index.html.md): iTerm2's own commands: inline images, marks, user variables, the clipboard and the working directory, and its other OSC extensions.
- [OSC 21: Kitty Color Protocol](https://control-codes.page/osc/kitty-color/index.html.md): Query and set the palette and the special colors by name, kitty's alternative to OSC 4 and OSC 10.
- [OSC 99: Kitty Extensions](https://control-codes.page/osc/kitty/index.html.md): Text sizing, drag and drop, notifications and the clipboard, as kitty defines them.
- [OSC 22: Change Pointer Shape](https://control-codes.page/osc/pointer/index.html.md): Change the shape of the mouse pointer while it is over the terminal.
- [OSC 9 ; 4: Progress Report](https://control-codes.page/osc/conemu/index.html.md): Show a program's progress in the tab and the taskbar, and ConEmu's other OSC 9 commands.
- [OSC 777: Perl Extension Command](https://control-codes.page/osc/rxvt/index.html.md): Pass a string to one of rxvt-unicode's Perl extensions; with the prefix notify, show a desktop notification.
- [OSC 2: Set Window Title](https://control-codes.page/osc/title/index.html.md): Set the title of the terminal's window or tab.
- [OSC 133: Semantic Prompt](https://control-codes.page/osc/prompt/index.html.md): Mark where a shell's prompt, the command typed at it, and the command's output begin and end.
- [OSC 7: Report Working Directory](https://control-codes.page/osc/cwd/index.html.md): Tell the terminal which directory the shell is in.

---

This is the Markdown version of <https://control-codes.page/osc/>. On that page every validation case runs live in libghostty-vt, the terminal emulation core of Ghostty, compiled to WebAssembly.
