Get current user in shell October 18, 2024 by poopcode Using a built-in variable: $ echo $USER anand Using a command: $ whoami anand