info > stty(1)

🏷️ NAME

stty — print or change terminal characteristics

🚀 Quick Reference

Use CaseCommandDescription
Display all current settingsstty -a📋 Print all terminal settings in human-readable form
Save current settingsstty -g💾 Output settings in a form that can restore later
Restore saved settingsstty $(stty -g)🔄 Use saved output to restore
Set baud ratestty 9600📡 Set input/output speed to 9600 baud
Set terminal sizestty rows 24 cols 80📐 Inform kernel of terminal dimensions
Enable software flow controlstty ixon↔️ Enable XON/XOFF flow control
Disable software flow controlstty -ixon🚫 Disable XON/XOFF flow control
Set raw modestty raw⚡ Set raw input/output (no processing)
Reset to sane defaultsstty sane✅ Restore sensible terminal settings
Set interrupt characterstty intr ^C🔤 Set special character to send interrupt
Use device instead of stdinstty -F /dev/ttyS0🔧 Operate on specific terminal device

📋 SYNOPSIS

stty [OPTION] [SETTING]...
stty [OPTION]

📝 DESCRIPTION

stty prints or changes terminal characteristics, such as baud rate.

If given no line settings, stty prints the baud rate, line discipline number (on systems that support it), and line settings that have been changed from the values set by stty sane. By default, mode reading and setting are performed on the tty line connected to standard input, although this can be modified by the --file option.

stty accepts many non-option arguments that change aspects of the terminal line operation, as described below.

Many settings can be turned off by preceding them with a -. Such arguments are marked below with May be negated in their description. The descriptions themselves refer to the positive case, that is, when not negated (unless stated otherwise, of course).

Some settings are not available on all POSIX systems, since they use extensions. Such arguments are marked below with Non-POSIX in their description. On non-POSIX systems, those or other settings also may not be available, but it's not feasible to document all the variations: just try it and see.

stty is installed only on platforms with the POSIX terminal interface, so portable scripts should not rely on its existence on non-POSIX platforms.

An exit status of zero indicates success, and a nonzero value indicates failure.

⚙️ OPTIONS

The program accepts the following options. Also see Common options.

🎛️ Control settings

⌨️ Input settings

These settings control operations on data received from the terminal.

🖨️ Output settings

These settings control operations on data sent to the terminal.

🏠 Local settings

🔗 Combination settings

🔤 Special characters

The special characters' default values vary from system to system. They are set with the syntax name value, where the names are listed below and the value can be given either literally, in hat notation (^C), or as an integer which may start with 0x to indicate hexadecimal, 0 to indicate octal, or any other digit to indicate decimal.

For GNU stty, giving a value of ^- or undef disables that special character. (This is incompatible with Ultrix stty, which uses a value of u to disable a special character. GNU stty treats a value u like any other, namely to set that special character to <U>.)

⚡ Special settings

stty(1)
🏷️ NAME 🚀 Quick Reference 📋 SYNOPSIS 📝 DESCRIPTION ⚙️ OPTIONS 🎛️ Control settings ⌨️ Input settings 🖨️ Output settings 🏠 Local settings 🔗 Combination settings 🔤 Special characters ⚡ Special settings

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-05 09:44 @216.73.216.89
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^