• lmmarsano@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    11 hours ago

    As usual, that’s documented (we can RTFM).

    Before trying ctrl-s, you may want to disable software flow control: run stty -ixon & add it to your initialization files. Otherwise, you’ll pause terminal output. ctrl-q resumes terminal output.

    stty reveals terminal special characters

    $ stty -a
    ⁝
    intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; …
    ⁝
    

    These special characters/keys often perform special functions. To illustrate

    • ctrl-d on empty input typically exits/logs out of interactive terminal applications (including shells)
    • ctrl-u discards input (useful for inputs like password prompts that don’t echo input back)
    • ctrl-v inputs next character literally (such as tab)