ARG_MAX| Shells | whatshell | portability | permissions | UUOC | ancient | - | ../Various | HOME
$@" | echo/printf | set -e | test | tty defs | tty chars |
)| IFS | using siginfo | nanosleep | line charset | locale
2011-02-27 (see recent changes)
motivation: curiosity and interest in historical correlations
In the following,
explains a possible origin of the "
You can find out stty defaults by looking into
<sys/termios.h> and alike.
On some system you can do that also with
stty didn't know
But in many later implementations, calling it without arguments
shows the differences from the defaults. This doesn't apply to GNU stty, though.
"stty sane" restores a few settings to the default, but not necessarily all.
When logged in remotely with
ssh(1) (instead of e.g.
you might not see the defaults.
ssh(1)/sshd(8) try to "export" your local settings to the remote session.
Also pay attention to shell profiles (login scripts).
Historically, the defaults are related to early teletype and video terminals.
@" for "
kill" was used before this character was introduced in mail adresses,
#" for "
erase" was used before it became the comment character in shells.
The defaults we are used to nowadays are from 4BSD in turn.
See an article from Christian Weisgerber with some background about the BackSpace vs. Delete issue.
The (unusual) defaults on HP-UX are in accordance to the SVID3
("3. System V Interface Definition"), as mentioned in
The SVID is an earlier standard, which obviously inherited from Version 7.
Sometimes you can explicitly unset a value by using "
undef" or "
\^-" as argument.
Keep in mind that an unprotected
^ is considered as a pipe symbol in traditional Bourne shells.
(Explicitly unsetting is sometimes helpful for changing "nasty" setting.)
A table with various defaults:
OS stty capability: intr erase susp kill lnext quit eof cs8 istrip parenb stty-a arbitrary choice: ^C DEL ^Z ^U ^V ^\ ^| ^D + + - + 6th edition (V6) <tty.h> DEL # n/a @ n/a n/a n/a n/a - 7th edition (V7) <sys/tty.h> DEL # n/a @ n/a n/a n/a n/a - System III <termio.h> DEL # n/a @ n/a - System V R1 <sys/tty.h> DEL # n/a @ n/a - ? 3BSD <sys/tty.h>, 4.0BSD <sys/tty.h> DEL # n/a @ n/a n/a n/a n/a - 4.1c/4.2/4.3 BSD <sys/ttychars.h> n/a n/a n/a - 4.4BSD <sys/ttydefaults.h> - + HP-UX A.08.07-B.09.03 [hpux] DEL # ( ) @ n/a - ? HP-UX B.10.10-B.11.22 [hpux] DEL # ( ) @ ( ) - + SINIX V5.2 DEL ^H n/a ^X n/a ^| - + MUNIX 3.2 (SVR3.2? ^B ^X n/a ^Y ^Z - + FreeBSD 4.3 [freebsd] - Linux 2.2.9 - NetBSD 1.5 - OpenBSD 2.9/3.1 ? - + SunOS 3.5, 4.1.4 - + SunOS 5.x ^| - + Unicos 184.108.40.206 ^| EP/IX 2.2.1AA DEL ^H ^| IRIX 4.0.5 / 5.3 / 6.5 DEL ^H OpenServer 5.0.6 DEL ^H ( ) UnixWare 7.1.4 DEL ^H OSF1 V4.0, V5.1 ^H Minix 3.1.1 ^H AIX 3.2.5 ^H AIX 4.3.2 ^H + intr erase susp kill lnext quit eof cs8 istrip parenb stty -a
About the table:
^|is equivalent to
^\, it is mentioned if
stty(1)prints this notation
sttycommand knows the flag
ASCII-ETX(decimal 3, octal 3)
ASCII-EOT(decimal 4, octal 4)
ASCII-BS(decimal 8, ictal 10)
ASCII-NAK(decimal 29, octal 25)
ASCII-SYN(decimal 30, octal 26)
ASCII-CAN(decimal 24, octal 30)
ASCII-EM(decimal 25, octal 31)
ASCII-SUB(decimal 26, octal 32)
ASCII-FS(decimal 28, octal 34)
^|is identical to
ASCII-DEL(decimal 127, octal 7F) (alternatively "
[hpux] HP-UX uses ^Z for "SWTCH"
[freebsd] FreeBSD 4 provides also an ERASE2 capability ("^H")