Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the stty command of linux to modify the relevant settings of the terminal command line

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Do not know how to use linux's stty command to modify the terminal command line settings? In fact, it is not difficult to solve this problem. Let the editor take you to learn how to solve it. I hope you will gain a lot after reading this article.

The stty command is used to check and modify the communication parameters of the currently registered terminal. The UNIX system provides an important control means for the input of the keyboard and the output of the terminal. Options can be set for specific terminals or communication lines through stty commands. Stty can also be used to control keys with special control functions. For example, the system may already use CTRL-D as the file Terminator, but you may like to use CTRL-C. At this point we can use the stty command to change these default settings.

Syntax format: stty [parameters]

Common parameters:

-a prints all current configurations in an easy-to-read way-g prints all current configurations in stty-readable mode

Reference example

The method of suppressing uppercase output on the command line:

[root@linuxcool ~] # stty iuclcstty-iuclc

Output lowercase is prohibited on the command line:

[root@linuxcool ~] # stty olcucstty-olcuc

Print out the number of rows and columns of the terminal:

[root@linuxcool ~] # stty size

Ways to change Ctrl+D:

[root@linuxcool ~] # stty eof "string"

Mask the display:

[root@linuxcool ~] # stty-echostty echo

Test method:

[root@linuxcool ~] # stty-echo;read;stty echo;read

Ignore carriage returns:

[root@linuxcool ~] # stty igncr Thank you for reading this article carefully. I hope it is helpful for everyone to share the relevant settings of the terminal command line using linux's stty command. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report