LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
LinkBack Search this Thread
Old 02-20-2013, 09:50 PM   #1
rng
Member
 
Registered: Aug 2011
Posts: 746

Rep: Reputation: 23
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
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5
Posts: 16,086

Rep: Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995
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
Location: Italy
Distribution: Slackware, NetBSD
Posts: 1,101
Blog Entries: 3

Rep: Reputation: 237Reputation: 237Reputation: 237
This thread could be useful
 
1 members found this post helpful.
Old 02-21-2013, 07:10 AM   #4
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Slack14_64_Multilib
Posts: 2,726
Blog Entries: 3

Rep: Reputation: 628Reputation: 628Reputation: 628Reputation: 628Reputation: 628Reputation: 628
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
Member
 
Registered: Aug 2011
Posts: 746

Original Poster
Rep: Reputation: 23
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
Senior Member
 
Registered: Jan 2011
Distribution: Slack14_64_Multilib
Posts: 2,726
Blog Entries: 3

Rep: Reputation: 628Reputation: 628Reputation: 628Reputation: 628Reputation: 628Reputation: 628
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


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 06:58 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