What is the command to find home directory?

QuestionsQuestions8 SkillsProBasic Files OperationsOct, 01 2025
0151

To find your home directory in Linux, you can use the following command:

echo $HOME

Alternatively, you can also use:

cd ~
pwd

The first command prints the path of your home directory, while the second command changes to your home directory and then prints the current working directory.

0 Comments

no data
Be the first to share your comment!