use of tty and pty files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers use of tty and pty files
# 1  
Old 09-18-2008
use of tty and pty files

Hi,

According to my understanding tty files that are available in /dev directory are terminals that are given to different users.

please help me understand what are /pty files, like are they drivers to the devices..

also is the default tty terminal given to a user..
# 2  
Old 09-18-2008
Quote:
Originally Posted by saharookiedba
Hi,

According to my understanding tty files that are available in /dev directory are terminals that are given to different users.

please help me understand what are /pty files, like are they drivers to the devices..
Right, so each terminal of each user is assigned an entry in the /dev directory somewhere, just as is each drive, each tape device, etc. The devices are "character" devices, which means they provide an interface to software allowing characters to be written to and read from in sequence. ("block" devices differ in that they can be written to and read from out of sequence.)

The /pty files are just the name given to such character devices. I believe it sort of stands for "Physical Terminal". Originally, they were named "tty" for "Teletype Terminals", where "teletype" was a kind of printer with a keyboard.

Quote:
also is the default tty terminal given to a user..
I'm not sure what you mean "default tty". Maybe you mean: is there a tty assigned to each user? No there isn't. Maybe you mean: is there a tty device that will be assigned if all others are already assigned? No there isn't.
# 3  
Old 09-18-2008
Actually pty is "pseudo-terminal", used for e.g. network log-ins where there isn't really a physical terminal at all, just a network connection from somewhere in the known universe.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Python: Redirecting to tty and reading from tty

In bash, you can do something like this: #!/bin/bash echo -n "What is your name? " > /dev/tty read thename < /dev/tty How can I do the same in python? I have a python script that has the following content: #!/usr/bin/python2.7 import getpass import sys import telnetlib import... (2 Replies)
Discussion started by: SkySmart
2 Replies

2. Shell Programming and Scripting

SSH w/ command in authorized_keys apparently needs pty

I'm trying to have an unattended remote PC log some data on home PC. man sshd says I should be able to put a command in authorized_keys. This is what I have on the remote machine. The key is a special key that isn't used elsewhere. In my ~/.ssh/authorized_keys file on my desktop:... (12 Replies)
Discussion started by: KenJackson
12 Replies

3. Solaris

PTY allocation request failed on channel 0

Hello Admins, Anybody faced this issue while logging through ssh on solaris: I am getting this error now. I was able to logged in before. Now I am getting this error. Any idea? (3 Replies)
Discussion started by: snchaudhari2
3 Replies

4. UNIX for Advanced & Expert Users

tty changes?

I am not sure if I am using the correct terminology but somehow my tty keeps changing on me. The man pages are confusing to me on what exactly the tty is. This is what I see when I run the tty command. Could anyone explain why my tty keeps changing? ~ $ tty /dev/pts/1 ~ $ tty /dev/pts/0 (6 Replies)
Discussion started by: cokedude
6 Replies

5. Programming

Race condition with PTY

I've been experimenting with pseudo-terminals and found something I don't quite understand. Writing an EOF character to the master end doesn't work quite as I expect. Once I've written any other data, the master pty seems to treat a single ^D as a seperator, i.e. writing "abcabc" would let cat do... (1 Reply)
Discussion started by: Corona688
1 Replies

6. UNIX for Advanced & Expert Users

Server refused to allocate pty

I know there is a thread on the subject but is not related to solaris so I am posting this question for help I have a solaris 8 machine. I can log in through the console but when trying to log in through putty/telnet after accepting username and password it gives the follwing error "Server... (2 Replies)
Discussion started by: Tirmazi
2 Replies

7. Linux

Server refused to allocate pty in linux

Hi, I am getting this error "Server refused to allocate pty" and Not able to login and I have to restart the server, this works fine for one day again 2 nd day when I am trying to login I am getting this error "Server refused to allocate pty", Can any body suggest me how to resolve this... (1 Reply)
Discussion started by: manoj.solaris
1 Replies

8. AIX

tty

Hi All can anyone tell me what is the meaning of tty,or give me an example of this? (1 Reply)
Discussion started by: magasem
1 Replies

9. Programming

good example for pty usage ?

i am looking for a good example to explain *why* someone should use pty's. (3 Replies)
Discussion started by: grumpf
3 Replies

10. AIX

How to monitor pty

Hi all, today I could not telnet in AIX 5.2 cause I received the error "telnetd: All network ports in use". To allow users to telnet again I increased the number of ptys from default 256 to the new number 512. To avoid the same problem in the future and for a better understanding, I need... (2 Replies)
Discussion started by: l-roner
2 Replies
Login or Register to Ask a Question