LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-01-2010, 07:39 AM   #1
smc2
LQ Newbie
 
Registered: Apr 2010
Posts: 29

Rep: Reputation: 0
Exclamation Who command: Ambiguous Ouptput


Hi..
I'm new to linux.
may you please answer these questions:
1- Why there is no IP address for some connections? what does ":0" or "0.0" or "1.0" means?
2- for first connection I have ":0" for tty and "-" for from.. what does they mean?
3- why for last connection I have "-bash" but for others I have only "bash"? what does this minus show?



Code:
16:47:52 up 19 days,  5:04, 10 users,  load average: 0.09, 0.04, 0.01
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     :0       -                12Nov10 ?xdm?  18:04   0.13s /usr/bin/gnome-
root     pts/4    10.10.10.160       14:26   31:10  11.11s  0.00s -bash
root     pts/6    10.10.10.160       14:38    2:08m  0.72s  0.71s watch -n 3 w
root     pts/7    10.10.10.160       14:40    1:32m  1.16s  1.14s watch -n 3 ls -
root     pts/8    10.10.10.160       14:58    1:42m  0.02s  0.00s tail -f /var/lo
root     pts/9    10.10.10.160       15:04    1:42m  0.01s  0.00s tail -f /var/lo
root     pts/1    :0.0             Sun08    3days  0.03s  0.03s bash
root     pts/2    :0.0             Sun08    7:21m  0.09s  0.08s bash
root     pts/3    :0.0             Sun08    3days  0.01s  0.01s bash
root     pts/12   :1.0             Tue17   22:58m  0.01s  0.01s -bash
I' using redhat 5.5

Thanks in Advance.
 
Old 12-01-2010, 08:12 AM   #2
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by smc2 View Post
Hi..
I'm new to linux.
may you please answer these questions:
1- Why there is no IP address for some connections? what does ":0" or "0.0" or "1.0" means?
2- for first connection I have ":0" for tty and "-" for from.. what does they mean?
3- why for last connection I have "-bash" but for others I have only "bash"? what does this minus show?



Code:
16:47:52 up 19 days,  5:04, 10 users,  load average: 0.09, 0.04, 0.01
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     :0       -                12Nov10 ?xdm?  18:04   0.13s /usr/bin/gnome-
root     pts/4    10.10.10.160       14:26   31:10  11.11s  0.00s -bash
root     pts/6    10.10.10.160       14:38    2:08m  0.72s  0.71s watch -n 3 w
root     pts/7    10.10.10.160       14:40    1:32m  1.16s  1.14s watch -n 3 ls -
root     pts/8    10.10.10.160       14:58    1:42m  0.02s  0.00s tail -f /var/lo
root     pts/9    10.10.10.160       15:04    1:42m  0.01s  0.00s tail -f /var/lo
root     pts/1    :0.0             Sun08    3days  0.03s  0.03s bash
root     pts/2    :0.0             Sun08    7:21m  0.09s  0.08s bash
root     pts/3    :0.0             Sun08    3days  0.01s  0.01s bash
root     pts/12   :1.0             Tue17   22:58m  0.01s  0.01s -bash
I' using redhat 5.5

Thanks in Advance.
Looks like homework !! Search in google 1st and some answers are:

There is no IP address for some connection because they are not connected from remote but from local machine(localhost).
:0 means no terminal login(gui login).
:0.0 means login from localhost not from remotehost.
In the 1st line indicates you have logged in from GUI(Gnome Session) whcih uses no terminal login
 
1 members found this post helpful.
Old 12-01-2010, 08:26 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
-bash indicates a login shell
 
1 members found this post helpful.
Old 12-01-2010, 08:59 AM   #4
smc2
LQ Newbie
 
Registered: Apr 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Thanks guys your are really helpful..

but what about "1.0" ?what does this mean?is there any man page that written all possible cases ?

dear catkin, would you please tell me what is the difference between login shell and shell? login shell are shell with root privileges?


Thanks again.
 
Old 12-01-2010, 09:39 AM   #5
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by smc2 View Post
Thanks guys your are really helpful..

but what about "1.0" ?what does this mean?is there any man page that written all possible cases ?

dear catkin, would you please tell me what is the difference between login shell and shell? login shell are shell with root privileges?


Thanks again.
Login shells are the ttys where you have to login 1st to use the shell but shell are the pts(pseudo terminals) which can be obtained by mouse-click (right click and open terminal on desktop) or from the accessories.
 
1 members found this post helpful.
  


Reply

Tags
linux



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
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 11:21 AM
how to copy drive using dd and tee command parallely? source code of dd command mdfakkeer Linux - Software 1 02-10-2010 01:31 PM
[SOLVED] append command output to file by giving command in terminal sumeet inani Linux - Newbie 4 07-03-2009 10:36 AM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 02:14 AM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 06:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:28 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
Open Source Consulting | Domain Registration