How do I get the current user’s username in Bash? September 15, 2022 by Tarik On the command line, enter whoami or echo "$USER"