tty

Print file name of terminal on standard input, print the file name of the terminal connected to standard input. It prints 'not a tty' if standard input is not a terminal.

Syntax
      tty [option]...

Options

   -s
   --silent
   --quiet
           Print nothing; only return an exit status.

 Exit status:

     0 if standard input is a terminal
     1 if standard input is not a terminal
     2 if given incorrect arguments
     3 if a write error occurs

"Behind every great fortune there is a crime" ~ Honore de Balzac

Related linux commands

env - Display, set, or remove environment variables.
hostname - Print or set system name.
id - Print user and group id's.
logname - Print current login name.
uname - Print system information.
users - Print login names of users currently logged in.
who - Print who is currently logged in.
whoami - Print the current user id and name ('id -un').
Equivalent Windows command: SET %COMPUTERNAME%.


 
Copyright © 1999-2024 SS64.com
Some rights reserved