LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2014, 04:41 AM   #1
sryzdn
Member
 
Registered: Feb 2013
Posts: 248

Rep: Reputation: 1
question on pts and pty


Hi,

Looking at man pages of pts and pty it says:

Quote:
pty: pseudoteletype
Quote:
pts: pseudo terminal slave
It seems that they both deal with master slave channels. But, pts refers to /dev/ptmx which is a device file. What is really their difference? Could you please give me a simple clarification on these terms?
 
Old 12-14-2014, 07:58 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,614

Rep: Reputation: 703Reputation: 703Reputation: 703Reputation: 703Reputation: 703Reputation: 703Reputation: 703
In early Unix systems the computer console was just lights and switches. If you wanted a keyboard and display (no mice then) you connected a terminal using a serial port. Those are long gone, but a lot of software still exists that expects to talk to a terminal. The master and slave you mention just emulate the two ends of that connection. When you open a bash window, the ps command shows a pts/0 which is the terminal end of the emulated serial connection. If you actually have a terminal it would be ttyS0. Opening ptmx is what creates a new pts when you start the terminal window. That saves you from having 256 pts in your dev directory and then having to search for a free one when you want to make a connection.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vpn poptop - CTRL: PTY read or GRE write failed (pty,gre)=(5,6) dezeque Linux - Networking 9 08-26-2016 11:39 AM
no more pty sachinh Linux - General 1 09-15-2009 06:00 AM
Not enough pty's? chup Linux - General 0 11-23-2004 11:31 AM
pts/0, pts/1 devices ?? nadine.mauch Linux - General 1 10-07-2004 12:00 PM
pts/0 etc. Remote access question hamish Linux - Networking 0 06-05-2004 03:25 AM


All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration