What does it mean when I appear twice in the output given by 'finger', on Ubuntu 9.04
Here is what I get when I type finger in the command line and press enter:
Login Name Tty Idle Login Time Office Office Phone
shawn Shawn tty7 4:26 Oct 4 14:29 (:0)
shawn Shawn pts/0 Oct 4 16:44 (:0.0)
Why is my name in there twice. Can I be logged in twice?
Thanks
You will see a single entry for each terminal You're connected to. Names from tty1 to tty6 are "regular" terminals (available at Ctrl+Alt+Fx, where x goes from 1 to 6), tty7 is used for GNOME/KDE session (one is active and You're logged and this is why You see this entry).
/dev/pty/x are virtual terminals, those available when You use e.g. gnome-terminal or when You log via ssh.
So yes, You'll usually see Yourself at least in 2 entries.
Yes, you can. As an example, have a look at my default gnome-terminal profile ("Run command as a login shell"). I log in every time I open a terminal.
finger
typically shows you the currently active sessions as maintained in /var/run/utmp, which is where an entry is added whenever you begin any kind of "login" session. From man login
:
/var/run/utmp
List of current login sessions.
/var/log/wtmp
List of previous login sessions.