Skip to content

Get current user in Shell

Using a built-in variable:

$ echo $USER
anand

Using a command:

$ whoami
anand
See also  unable to create listener: Error listen tcp4 0.0.0.0:443: bind: permission denied - Fix in Ubuntu

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.