博客
关于我
Linux 系统设置 : reset 命令详解
阅读量:271 次
发布时间:2019-03-01

本文共 676 字,大约阅读时间需要 2 分钟。

reset命令与tset命令功能相同,主要用于设定终端机的状态。该命令通常根据环境变量、命令序列或其他配置文件来确定终端机的当前状态。如果指定的状态为?,则会提示用户输入终端机的类型。

由于该命令能够将终端机恢复到原始状态,除了登录时的设定外,它也非常有用。当系统或程序导致终端机进入异常状态时(例如不小心通过cat命令进入二进制档),你可以使用reset命令将终端机恢复到正常状态。

语法

tset [-IQqrs] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal]

参数说明:

  • -p:显示当前终端机的类型,但不进行设置。
  • -e ch:将erase字符设定为ch
  • -i ch:将interrupt字符设定为ch
  • -k ch:将删除一行的字符设定为ch
  • -I:不执行设置操作,但会显示当前eraseinterruptdelete字符的值(除非使用了-Q选项)。
  • -Q:不显示eraseinterruptdelete字符的值。
  • -r:显示终端机类型。
  • -s:将TERM的值以字符串形式显示(通常用于.login.profile文件中)。

实例

让用户输入终端机类型并设置状态:

# reset ?

设置erase字符为^B

# reset -e ^B

显示当前设置的字串并输出终端机类型:

# reset -sErase is control-B (^B).Kill is control-U (^U).Interrupt is control-C (^C).TERM=xterm;

转载地址:http://qzyt.baihongyu.com/

你可能感兴趣的文章
npm ERR! Unexpected end of JSON input while parsing near '...on":"0.10.3","direc to'
查看>>
npm ERR! Unexpected end of JSON input while parsing near ‘...“:“^1.2.0“,“vue-html-‘ npm ERR! A comp
查看>>
npm error Missing script: “server“npm errornpm error Did you mean this?npm error npm run serve
查看>>
npm error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,1) 安装
查看>>
npm install CERT_HAS_EXPIRED解决方法
查看>>
npm install digital envelope routines::unsupported解决方法
查看>>
npm install 卡着不动的解决方法
查看>>
npm install 报错 EEXIST File exists 的解决方法
查看>>
npm install 报错 ERR_SOCKET_TIMEOUT 的解决方法
查看>>
npm install 报错 Failed to connect to github.com port 443 的解决方法
查看>>
npm install 报错 fatal: unable to connect to github.com 的解决方法
查看>>
npm install 报错 no such file or directory 的解决方法
查看>>
npm install 权限问题
查看>>
npm install报错,证书验证失败unable to get local issuer certificate
查看>>
npm install无法生成node_modules的解决方法
查看>>
npm install的--save和--save-dev使用说明
查看>>
npm node pm2相关问题
查看>>
npm run build 失败Compiler server unexpectedly exited with code: null and signal: SIGBUS
查看>>
npm run build报Cannot find module错误的解决方法
查看>>
npm run build部署到云服务器中的Nginx(图文配置)
查看>>