LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-20-2013, 09:50 PM   #1
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Rep: Reputation: 47
who/what is this on 'who' command output


The output of 'who' command on my debian sid system with lxde and lightdm is:
Quote:
$ who
abcde tty7 2013-02-21 08:37
abcde pts/0 2013-02-21 08:37 (:0)
abcde pts/1 2013-02-21 08:37 (:0)
I have two terminals open at this time. My username is abcde. If I remember correctly, 'who' used to give 2 lines pts/0 and pts/1 when 2 terminals were open. What is this tty7 entry?

I tried command 'ps aux | grep tty7' . The output was:
Quote:
$ ps aux | grep tty7
root 902 3.0 2.4 25844 12448 tty7 Ss+ 08:37 1:16 /usr/bin/Xorg :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
Is there anything to worry about here? Thanks for your help.
 
Old 02-20-2013, 11:11 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
The tty session is where you logged in, pts is for the 2 terminals you have open.
 
Old 02-21-2013, 03:19 AM   #3
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 275Reputation: 275Reputation: 275
This thread could be useful
 
1 members found this post helpful.
Old 02-21-2013, 07:10 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by rng View Post
What is this tty7 entry?
It is your login to the desktop that is using this.

Test:
Close programs and logout to login screen.
Ctrl+Alt+F1 but do not login
Ctrl+Alt+F7 should take you back to graphical login dialog.

Nothing to worry about.

tty7 will always be in use if you are using a desktop environment. The other 2 are your 2 open bash shells.
 
Old 02-21-2013, 07:47 AM   #5
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Thanks for your reassuring comments.

I have debian wheezy (with lxde- same as the one with debian sid/unstable) installed on another computer where 'who' command outputs only pts/1 and pts/0 lines. No tty line here.

Though the command 'ps aux | grep tty' produces this output:
Quote:
root 1096 0.0 0.0 3780 848 tty1 Ss+ 20:24 0:00 /sbin/agetty tty1 38400
root 1107 0.5 0.9 58520 36996 tty7 Ss+ 20:24 0:36 /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
How do you explain that?

Last edited by rng; 02-21-2013 at 10:42 AM.
 
Old 02-21-2013, 10:51 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I don't run debian, so I can't explain it with any reasonable assurance.

Different implementation of the "who" command, an alias that suppresses tty on "who"?, I could theorize for an hour on any one of of those 'reasons', but I'd be talking out of my arse.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Requests to my ISP server are output in the middle of output by any command I run. stf92 Slackware 2 07-10-2012 08:38 AM
How to redirect the output of exec command output in perl? sudhap85 Linux - Newbie 3 08-28-2009 03:35 PM
[SOLVED] append command output to file by giving command in terminal sumeet inani Linux - Newbie 4 07-03-2009 10:36 AM
Grep on output of command returns all output traigo Linux - Newbie 2 02-24-2009 05:15 PM
How do I parse the output of a command that output to standard out? gauol Programming 9 01-17-2008 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:26 AM.

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
Open Source Consulting | Domain Registration