LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 03-16-2010, 11:13 PM   #1
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Rep: Reputation: 15
Unhappy difference between tty and pts


What is the difference between /dev/tty and /dev/pts ??
I google a lot but didn't understand......

Thanks in advance
 
Old 03-16-2010, 11:45 PM   #2
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 68

Rep: Reputation: 21
/dev/pts --> it shows that you are in virtual terminal, when you ssh a server remotely..it is in pts

/dev/tty --> if it's in true tty
 
Old 03-16-2010, 11:51 PM   #3
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
Quote:
when you ssh a server remotely..it is in pts
It's also a /dev/ptsn when you're in an X terminal.

If you want to know what terminal you're on, you can use the tty command.
 
Old 03-17-2010, 04:32 AM   #4
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
tty = hardwired terminal on a serial connection.
pts (a/k/a pty) is a pseudo-tty to emulate terminals on network connections.
 
Old 03-18-2010, 08:02 AM   #5
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Unhappy Not Clear

These answer are quite confusing. Is tty some software or hardware component ?????

using who command gives the following output...
Code:
_Linux_Learner tty7         2010-03-18 17:32 (:0)
_Linux_Learner pts/0        2010-03-18 18:10 (:0.0)
what this tty7 shows ?? In the /dev directory there are more tty1,tty2...... and ttys1,ttys2 etc ....

Please elaborate.

Thanks in advance
 
Old 03-18-2010, 11:21 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by _Linux_Learner View Post
These answer are quite confusing. Is tty some software or hardware component ?????
"tty"s are device files that were originally used when accessing actual hardware terminals but are now more commonly used for accessing virtual terminals, the ones you get by Alt+Tab+F<n> where n is typically 1-6. In case a historical perspective helps, the name is short for teletype which is the sort of device people used for accessing computers before the price and size of memory chips made cathode ray tube screens affordable (they needed a massive 1kB capacity!)

"pty"s are pseudo "tty"s that are not associated with actual hardware, as used by "terminal emulator" software such as X's xterm and Windows' HyperTerm.
 
1 members found this post helpful.
Old 03-18-2010, 11:28 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by _Linux_Learner View Post
what this tty7 shows ??
tty7 is virtual terminal 7, where the system displays the graphical logon prompt and, after logon, the desktop. If you are displaying one of the other virtual terminals (via Ctrl+Alt+F<n> where n is 1 to 6) then you can get back to virtual terminal 7. Typically the system starts one of the graphical display managers (gdm, kdm or xdm) on tty7 during boot and switches the display to it. Many people never leave it so do not see the other virtual terminals until shutdown when tty0 (the console) is displayed again.
 
1 members found this post helpful.
Old 03-18-2010, 12:44 PM   #8
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Question Got Something

Hi catkin

Thanks for your valuable help. I got the meaning of this tty. Now I want to know that why there are so many tty (tty1, tty2, tty3.......so on). Do they have some restricted access levels etc....

Regards
_Linux_Learner
 
Old 03-18-2010, 09:50 PM   #9
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
Quote:
Now I want to know that why there are so many tty (tty1, tty2, tty3.......so on). Do they have some restricted access levels etc....
AFAIK it's so you can multi-task. Having more than one text terminal means you can be running a long (presumably non-interactive) process on one terminal, while doing something else on another.

But of course, if you have X11 (which most big distros do now), then you can do the same thing with virtual terminals within the graphical environment.

Last edited by MrCode; 03-18-2010 at 09:52 PM.
 
Old 03-18-2010, 11:16 PM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by _Linux_Learner View Post
Now I want to know that why there are so many tty (tty1, tty2, tty3.......so on). Do they have some restricted access levels etc....
No, they are all simply terminals at which you can log on in the normal way.

Your question is valid and you are in good company; the designers of Slackware didn't think there was any point in having so many when running a graphical screen so by default it comes with only two in graphical mode -- tty6 and tty7.
 
Old 03-18-2010, 11:37 PM   #11
fbsduser
Member
 
Registered: Oct 2009
Distribution: Hackintosh, SlackWare
Posts: 266

Rep: Reputation: 30
Quote:
Originally Posted by _Linux_Learner View Post
Hi catkin

Thanks for your valuable help. I got the meaning of this tty. Now I want to know that why there are so many tty (tty1, tty2, tty3.......so on). Do they have some restricted access levels etc....

Regards
_Linux_Learner
There are so many tty's because when Linux was first made, X11 wasn't free or good enough to include it in Linux, which means that initially it was command line only and to multi-task you needed as much fullscreen terminals (tty's) as possible. Off-course you don't need them as much now that you can have as many pts's (xterm's) as you want within the graphical environment of X11.
 
  


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
tty and pts culin Linux - General 5 03-07-2013 05:59 PM
How to slow down text on a TTY or PTS ? mattyo Linux - General 0 05-17-2009 07:07 AM
TTY pts/# terminals increasing. Technoslave Linux - General 1 04-22-2004 01:28 PM
Bash: How to tell a tty from a pts? m0rl0ck Programming 4 08-21-2003 06:26 AM
rxvt: can't open slave tty /dev/pts/3 kater Linux - General 2 02-26-2003 06:39 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration