1. The simpliest command to see who's logged in:
2. If you want more detailed output install finger:
sudo apt-get install finger
this command will output the users login username, real name, home directory, shell access, the last login time, idle time, the ip from which he logged on.
3. to see the last logins and logout history on current machine:
4. to see the last login of all users on current machine: