What happens when you type this command?

$ echo $HOME

The HOME variable is an environment variable that displays the path of the home directory ~. You can specify and change the HOME variable if needed, but in most cases this is not necessary.

Here, by typing echo $HOME, the terminal displays the path /home/ccuser as output.



Let’s see the value of $HOME currently.

In the command line, type:

echo $HOME

This returns the value of the HOME variable.

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?