cunixnetworkingttyvocabulary

What do pty and tty mean?


I noticed many mentions of pty and tty in some open source projects, could someone tell me what do they mean and what is the difference between them?


Solution

  • tty originally meant "teletype" and "pty" means "pseudo-teletype".

    In UNIX, /dev/tty* is any device that acts like a "teletype", i.e: a terminal. (Called teletype because that's what we had for terminals in those benighted days.)

    A pty is a pseudotty, a device entry that acts like a terminal to the process reading and writing there, but is managed by something else. They first appeared (as I recall) for X Window and screen and the like, where you needed something that acted like a terminal but could be used from another program.