Use stty to modify terminal settings

Source: Internet
Author: User
Article Title: Use stty to modify terminal settings. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

In sqlplus on linux/unix platforms, if an error occurs, you must manually press the backspace key to delete the character. Instead of deleting the character you want to delete, there are two more characters ^ H. However, we can press ctrl + backspace to delete the objects at the same time, but it is uncomfortable for users who are used to using backspace to delete objects. This allows you to delete backspace by modifying the settings of the tty terminal. You can use the stty command to view or modify the key settings of the terminal.

For example, set backspace as the deletion key:

[Oracle10g @ linux] $ stty erase ^ h

Use ctrl + backspace as the deletion key again

[Oracle10g @ linux] $ stty erase ^?

If you need to automatically set the terminal after the restart, you can add the above command to the profile.

You can use the stty-a command to view all terminal settings. The following output is executed in linux:

[Oracle10g @ linux] $ stty-

Speed 38400 baud; rows 66; columns 132; line = 0;

Intr = ^ C; quit = ^ \; erase = ^ H; kill = ^ U; eof = ^ D; eol = ; Eol2 = ; Start = ^ Q; stop = ^ S; susp = ^ Z; rprnt = ^ R;

Werase = ^ W; lnext = ^ V; flush = ^ O; min = 1; time = 0;

-Parenb-parodd cs8-hupcl-cstopb cread-clocal-crtscts

-Ignbrk-brkint-ignpar-parmrk-inpck-istrip-inlcr-igncr icrnl ixon-ixoff-iuclc-ixany-imaxbel

Opost-olcuc-ocrnl onlcr-onocr-onlret-ofill-ofdel nl0 cr0 tab0 bs0 vt0 ff0

Isig icanon iexten echo echoe echok-echonl-noflsh-xcase-tostop-echoprt echoctl echoke

Where:

Eof: the input ends.

Erase: Remove characters from the backend,

Intr: interrupt the current program

Kill: Delete the entire command

Quit: exit the current program

Start: start screen output

Stop: stop the screen output;

Susp: terminal stop current program.

Original address http://hi.baidu.com/kkxxzz/blog/item/9ae02eef98335115fdfa3c37.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.