tty 命令详解


打印连接到标准输入的终端文件名。

若标准输入不是终端, 打印 not a tty。

另请参阅: bash     vim     tty Documentation

Basic Usage     Detailed Usage

root:~# tty
/dev/pts/0
root:~#
			

基本语法

tty [OPTION]...
			

选项参数

参数 EN 解释 中文翻译 Remark
-s, --silent, --quiet print nothing, only return an exit status 什么都不打印,仅返回退出状态
Exit status 0 if standard input is a terminal 退出状态 0 若标准输入是终端
1 if standard input is a non-terminal file 1 若标准输入是非终端文件
2 if given incorrect arguments 2 若给定不正确自变量
3 if a write error occurs 3 若发生写入错误
--help display this help and exit 显示此帮助并退出
--version output version information and exit 输出版本信息并退出

Basic Usage

Function 命令 文字解释 示例 示例解释
帮助 tty --help 展示帮助信息
Version tty --version 展示版本信息

 

Copyright Notice: This article is an exclusive original manuscript, copyright belongs to Happy Digits Software , shall not be reproduced without permission.