Skip to content

Get home directory of logged in user in Shell

Using a built-in variable:

$ echo $HOME

Using a tilde:

$ echo ~
See also  Get current user in Shell

Leave a Reply

Your email address will not be published.

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