Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

31.7 Pseudo-Terminals

Hardwired CRT terminals may be nothing more than museum fodder these days, but their spirit lives on in the form of pseudo-terminals. These pairs of device files emulate a text terminal interface on behalf of services such as virtual consoles, virtual terminals (e.g., xterm), and network login services like telnet and ssh.

Here’s how it works. Each of the of the paired device files accesses the same device driver inside the kernel. The slave device is named something like /dev/ttyp1. A process that would normally interact with a physical terminal, such as a shell, uses the slave device in place of a physical device such as /dev/ttyS0. A host process such as sshd or telnetd opens the corresponding master device—in this example, /dev/ptyp1. The pseudo-terminal device driver shuttles keystrokes and text output between the two devices, hiding the fact that no physical terminal exists.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint