Get home directory of logged in user in Shell October 18, 2024 by poopcode Using a built-in variable: $ echo $HOME /Users/anand Using a tilde: $ echo ~ /Users/anand