FreeBSD Find out who is logged in?

Q. How do I find out who is logged in and what they are doing?

A. On a FreeBSD, many users will be sharing the same system. If you want to find out if your friend or a coworker is logged in or not on FreeBSD, then you can use following commands.

Please note that following commands works with Linux and other UNIX like oses.

Task:Display who is on the system

To display who is on the system type following command at shell prompt:

$ who
$ who | grep vivek
$ who | less

The who utility displays information about currently logged in users. By default, this includes the login name, tty name, date and time of login and remote hostname if not local.

Task: Find out what user doing

You use w command to display who is logged in and what they are doing:

$ w

You can use the last utility to display either list the sessions of specified users, ttys,
and hosts, in reverse time order, or list the users logged in at a specified date and time.

$ last
$ last root

See also:


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • unknown May 30, 2016 @ 11:24

    sir,
    how to we connect another users i mean that unknown person

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum