You can ls /dev/console to see the currently logged in user of a machine. To do so: /bin/ls -l /dev/console You can also just grab the username, as follows /bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'
You can ls /dev/console to see the currently logged in user of a machine. To do so: /bin/ls -l /dev/console You can also just grab the username, as follows /bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'