Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, I'm a linux newbie, and would like to ask for a proper explanation about what the last command gives. Here is the sample of what I got: Code: user1 ...
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Posts
    16

    Linux "last" command

    Hello,

    I'm a linux newbie, and would like to ask for a proper explanation about what the last command gives.

    Here is the sample of what I got:
    Code:
    user1   pts/2        10.15.3.4           Fri Aug 24 18:21 - 18:21  (00:00)
    user2   pts/1                                Fri Aug 24 18:11 - 18:55  (00:44)
    user3   pts/1        :0.0                  Thu Aug  2 15:41 - down   (02:41)
    root    tty1                                 Wed Aug  1 19:09 - down   (23:14)
    user3   :0                                    Wed Aug  1 19:02 - down   (23:21)
    I guess each of the above logged sessions represents different way of logging in the system, so if anyone could explain for me these differences, it would be very helpful for my knowledge. The system is current using Debian 4.0, kernel 2.6.18-5-686.

    Thank you for your consideration.

    SG.

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,343
    The manual explains what last does i.e. shows a listing of last logged in users. ttyX are virtual terminals (the CLI interfaces that you log into if you boot into text mode or do CTRL-ALT-Fn), pts/X are pseudo terminals (i.e. CLI sessions started started inside a GUI session e.g. by running xterm, konsole etc). The :0 means that a user logged into an X session at display :0.

  3. #3
    Just Joined!
    Join Date
    Nov 2006
    Posts
    16
    Thank you daark.child, but there is one point.

    When looking at the line 2, I saw that user logged in via pseudo terminals. If I use ssh, then it would display my remote IP address (or host name). If I log in to GUI, and then open a terminal, it would display something like :0.0. But in this case it does not display anything.

    So could you please describe for me a little bit more about this situation.

    SG.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •