Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-14-2014, 04:41 AM   #1
Registered: Feb 2013
Posts: 273

Rep: Reputation: 9
question on pts and pty


Looking at man pages of pts and pty it says:

pty: pseudoteletype
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
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,242

Rep: Reputation: 882Reputation: 882Reputation: 882Reputation: 882Reputation: 882Reputation: 882Reputation: 882
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.


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:44 AM.

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