Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tty(1) [v7 man page]

TTY(1)							      General Commands Manual							    TTY(1)

NAME
tty - get terminal name SYNOPSIS
tty DESCRIPTION
Tty prints the pathname of the user's terminal. DIAGNOSTICS
`not a tty' if the standard input file is not a terminal. TTY(1)

Check Out this Related Man Page

TTY(4)							     Linux Programmer's Manual							    TTY(4)

NAME
tty - controlling terminal DESCRIPTION
The file /dev/tty is a character file with major number 5 and minor number 0, usually of mode 0666 and owner.group root.tty. It is a syn- onym 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), termios(3), console(4), tty_ioctl(4), ttyS(4), agetty(8), mingetty(8) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2003-04-07 TTY(4)
Man Page

15 More Discussions You Might Find Interesting

1. Solaris

What is /dev/tty /dev/null and /dev/console

Hi, Anyone can help My solaris 8 system has the following /dev/null , /dev/tty and /dev/console All permission are lrwxrwxrwx Can this be change to a non-world write ?? any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies

2. UNIX for Advanced & Expert Users

Change putty title window?

Is it possible to change the putty window title from a Unix command line? (12 Replies)
Discussion started by: akbar
12 Replies

3. AIX

Question about Smitty Fs (backup an F.S)

hi all:cool: was just wonderin..by the way im new here..hi all:D...was just wonderin if i smitty fs backup a file system to tape if the permissions and ownership of the files and dir are retained?:confused: o.s is AIX 5.3L thanks all (12 Replies)
Discussion started by: redmanshogun
12 Replies

4. UNIX for Advanced & Expert Users

stty: error occurs when installing rpm

Hello All, when I install rpm rpm --install rpm packagename I got the following errors stty:standard input:invalid argument stty:standard input:invalid argument I dont know what i have to do exactly. I search on google for the same but not a particular standard solution is given... (17 Replies)
Discussion started by: amitpansuria
17 Replies

5. Shell Programming and Scripting

POSIX way of getting columns in tty?

Is there a POSIX compatible way of getting the number of columns in a tty? On Linux, I can do something like: stty -a | awk -F'' '/columns/ { print $9 }' But will that work on AIX, Solaris, etc? (13 Replies)
Discussion started by: otheus
13 Replies

6. UNIX for Dummies Questions & Answers

TTY Insane

Hi All, Long time reader, first time poster. I have a tip session to a v480 serial console running Solaris 9. Look at this mess I'm getting back... connected... (16 Replies)
Discussion started by: danny.hudson
16 Replies

7. AIX

Stty settings before login

Hello. I'm experiencing a frustrating issue. I'm using an old, unsupported terminal client (QVT) with AIX 6.1 using ssh2. I've come up with some stty settings that allow full usage of the system but to do so I've had to set "igncr". While this works fine once the user is logged in there are... (12 Replies)
Discussion started by: RedCabbage
12 Replies

8. Shell Programming and Scripting

Exits from putty instead of shell script

Dear, I have written below code to initiate the log at top of my script. #Set the log file LOGFILE=<path>/<filename.log> exec > $LOGFILE 2>&1 ............... .... ... .. ............ echo -e "\n\n Script finished OK " `date "+%m/%d/%y %H:%M:%S" ` "\n\n" exit 0 the logging ends only... (14 Replies)
Discussion started by: Imran_Chennai
14 Replies

9. AIX

Cannot create user using SMITTY

i'm using smitty to create user...what happen is it prompt me "failed" with error 3004-703 Check "/etc/security/login.cfg" file. 3004-691 Error changing "shell". 3004-703 Check "/usr/lib/security/mkuser.default" file. 3004-721 Could not create user. 3004-703 Check... (13 Replies)
Discussion started by: thecobra151
13 Replies

10. UNIX for Dummies Questions & Answers

Change putty title name

Hello all, I have a not so unix question for you guys(or maybe it is). I use PUTTY to login to serverA (my putty title shows as serverA.domainname.com) Now from ServerA i do ssh user@ServerB (i have ssh public private key setup)... now my question is when i do ssh and logon to... (20 Replies)
Discussion started by: abdul.irfan2
20 Replies

11. Shell Programming and Scripting

Stty: : No such device or address

hi, i am trying to execute a script through Cron, then everytime it is redirecting a message stty: : No such device or address Unmatched ` here is the cron entry: 35,40,45,50,55 04,05 07 08 * /uv1402/u207/home/bravodba/bestdbscript/shscriptfiles/bravo_main_refresh.sh while the script... (20 Replies)
Discussion started by: lovelysethii
20 Replies

12. Homework & Coursework Questions

Asst: Shell Script to sed

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Generalize your sub2 script, producing a new script sub3 that will apply a substitution to any number of files... (16 Replies)
Discussion started by: raymondbn
16 Replies

13. UNIX for Dummies Questions & Answers

Remove newlines

Hi buddy's my file are like this: s.no,name,band,sal 1,"suneel",,10 2,"bargav sand",,20 30," ebdug gil",,4 but i want s.no,name,band,sal 1,"suneel",,10 2,"bargav sand",,20 30,"ebdug gil",,4 any command or Shell script for this. please help me it's urgent to implement (33 Replies)
Discussion started by: Suneelbabu.etl
33 Replies

14. UNIX for Dummies Questions & Answers

Can we build a tool for Windows to retrieve data from UNIX servers (putty console)

Hi Friends, Is it possible to build a windows tool ( a java applet maybe? ) which can retrieve data and display after performing certain commands on unix servers ( simple grep / script output) after logging into putty console. I am on a company server so please bear that in mind. I might have... (23 Replies)
Discussion started by: srkmish
23 Replies

15. Shell Programming and Scripting

Automating pbrun /bin/su not working, whenever manually it is working using putty

I am trying to automate a script where I need to use pbrun /bin/su but for some reason it is not passing thru the pbrun as my code below. . ~/.bash_profile pbrun /bin/su - content c h 1 hpsvn up file path I am executing this from an external .sh file that is pointing to this scripts file... (14 Replies)
Discussion started by: jorgejac
14 Replies