tset命令的作用是可以进行终端初始化。默认终端类型为“unknown”。
如果命令行上没有指定终端类型,则应用-m选项映射,如果终端类型以问号(” ? “)开头,则提示用户确认终端类型。或者可以输入另一个类型来指定新类型。一旦确定了终端类型,就会检索终端。如果没有找到该类型的,则提示用户输入另一种终端类型。
一旦获取了条目,就会设置窗口大小、退格、中断和行终止字符(以及许多其他内容),并且将终端和制表符初始化字符串发送到标准错误输出。最后,如果擦除、中断和行终止字符已经更改,或者没有设置为默认值,那么它们的值将显示在标准错误输出中。
语法格式:tset [参数] [终端]
常用参数:
| -w | 调整窗口的大小,以匹配通过setupterm推导的大小 |
| -c | 控制字符和模式 |
| -e<ch> | 将擦除字符设置为ch |
| -i<ch> | 将中断字符设置为ch |
| -I | 不要发送终端或标签初始化字符串到终端 |
| -k<ch> | 将行删除字符设置为ch |
| -m<映射> | 从一个端口类型到一个终端指定一个映射 |
| -Q | 为擦除、中断和行删除字符不显示任何值 |
| -q | 终端类型被显示到标准输出,并且所述终端是不以任何方式进行初始化 |
| -r | 输出终端类型到标准输出 |
| -s | 输出shell命令的序列来初始化环境变量TEERM到标准输出 |
参考实例
终端初始化:
[root@linuxcool ~]# tset
显示终端类型:
[root@linuxcool ~]# tset -q
将中断字符设置为ch:
[root@linuxcool ~]# tset -i ch Interrupt set to c.

Hello! I’ve been following your site for a while now
and finally got the bravery to go ahead and give
you a shout out from Atascocita Tx! Just wanted to mention keep up the good job!
I do not know if it’s just me or if everybody else experiencing issues with your site.
It appears as though some of the written text in your content are running off the screen. Can someone else please provide feedback and let me know if this is
happening to them too? This might be a issue with my browser because I’ve had this happen before.
Many thanks
It’s very trouble-free to find out any topic on web
as compared to textbooks, as I found this post at this web site.
Normally I don’t learn post on blogs, but I wish to say that this write-up
very compelled me to check out and do so! Your writing style has been amazed me.
Thank you, quite nice article.
Why visitors still make use of to read news papers when in this technological world everything is
presented on net?
This website certainly has all the info I needed concerning this
subject and didn’t know who to ask.
It’s amazing to pay a visit this web site and reading the views
of all mates regarding this piece of writing, while
I am also eager of getting experience.
I was suggested this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem.
You are wonderful! Thanks!
What’s Going down i am new to this, I stumbled
upon this I’ve found It absolutely useful and it
has helped me out loads. I hope to give a contribution & aid other customers like its
helped me. Good job.
I am in fact glad to read this webpage posts which includes
tons of helpful facts, thanks for providing these kinds of data.