Solution 1:

You can type /list to see a list of all connected players

Note however, that if a server is running mods, the usual command is /playerlist

Also, you can use /help to get more information about the commands.

Do note that you need to be op to run /list, and mods might disable or restrict the /playerlist commands for certain users or usergroups.