LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can someone explain tty and pty for me? (https://www.linuxquestions.org/questions/linux-newbie-8/can-someone-explain-tty-and-pty-for-me-296391/)

blancs 03-01-2005 02:34 PM

Can someone explain tty and pty for me?
 
Trying to google it and I really haven't gained a complete understanding of the concept... Its pretty bad since I have been using solaris and various linux for years now and I dont quite seem to under stand the fundamentals some time? Can anyone explain those two thing for me or anything else I might have missed that I need to have a understanding for?

bulliver 03-01-2005 04:15 PM

tty is a 'real' terminal on the console, that is the ones you see when when you do a [ctrl]+[alt]+[Fn]

pty is a 'psuedo' terminal. You would be using one of these in a console session inside say, Eterm or Konsole

At least this is my understanding, but of course I could be wrong ;)

foo_bar_foo 03-01-2005 07:59 PM

yes what bulliver has said is correct
tty stands for teletype machine
i think in the old days there used to be a teletype machine hooked directly via a serial connection
to the mainframe and this was the controlling terminal for job controll
then lots of other people would log in via modem over other teletype machines (ptty)
tty is a real controlling device like your text terminal and keyboard
you see a bunch of real device nodes in dev called tty
however ptys live in a folder called /dev/pts
and in there are just a bunch of numbers that come and go dynamcally
this is a special mounted filesystem handled by the kernel alot like /proc and /sys
in there the kernel is using these pseudo device nodes as pipes to connect remote logins from the network to processes on the computer
remember the x server is really a server accepting client connections
so your xterm is a remote teletype machine logging onto the system
just like remote users on the network accessing the shell via ssh or something


All times are GMT -5. The time now is 11:38 PM.