Section (1) tty


Linux manual pages Section 1  

Name

tty — print the file name of the terminal connected to standard input

Synopsis

tty [OPTION...]

DESCRIPTION

Print the file name of the terminal connected to standard input.

−s, −−silent, −−quiet

print nothing, only return an exit status

−−help

display this help and exit

−−version

output version information and exit

AUTHOR

Written by David MacKenzie.

REPORTING BUGS

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>

Report any translation bugs to <https://translationproject.org/team/>

SEE ALSO

Full documentation <https://www.gnu.org/software/coreutils/tty>

or available locally via: info _zsingle_quotesz_(coreutils) tty invocation_zsingle_quotesz_

COPYRIGHT

Copyright © 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Section (4) tty


Linux manual pages Section 4  

Name

tty — controlling terminal

DESCRIPTION

The file /dev/tty is a character file with major number 5 and minor number 0, usually with mode 0666 and ownership root:tty. It is a synonym for the controlling terminal of a process, if any.

In addition to the ioctl(2) requests supported by the device that tty refers to, the ioctl(2) request TIOCNOTTY is supported.

TIOCNOTTY

Detach the calling process from its controlling terminal.

If the process is the session leader, then SIGHUP and SIGCONT signals are sent to the foreground process group and all processes in the current session lose their controlling tty.

This ioctl(2) call works only on file descriptors connected to /dev/tty. It is used by daemon processes when they are invoked by a user at a terminal. The process attempts to open /dev/tty. If the open succeeds, it detaches itself from the terminal by using TIOCNOTTY, while if the open fails, it is obviously not attached to a terminal and does not need to detach itself.

FILES

/dev/tty

SEE ALSO

chown(1), mknod(1), ioctl(2), ioctl_console(2), ioctl_tty(2), termios(3), ttyS(4), vcs(4), pty(7), agetty(8), mingetty(8)

COLOPHON

This page is part of release 5.04 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man−pages/.


  Copyright (c) 1993 Michael Haardt (michaelmoria.de),
    Fri Apr  2 11:32:09 MET DST 1993

%%%LICENSE_START(GPLv2+_DOC_FULL)
This is free documentation; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.

The GNU General Public License_zsingle_quotesz_s references to object code
and executables are to be interpreted as the output of any
document formatting or typesetting system, including
intermediate and printed output.

This manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public
License along with this manual; if not, see
<http://www.gnu.org/licenses/>.
%%%LICENSE_END

Modified 1993-07-24 by Rik Faith (faithcs.unc.edu)
Modified 2003-04-07 by Michael Kerrisk