tty
Show filename of terminal connected to stdin. toybox
On Linux
Linux
Show filename of terminal connected to stdin. If none print "not a tty" and exit with nonzero status.
tty [-s]
-sSilent, exit code onlySeveral platforms
Return the terminal name.
Print the file name of this terminal
ttyIdentify