0

I'm learning bash code, and if I try to

cd /Home

I have this error:

bash: cd: Home: Not a directory

If I run:

ls -lh (in /)

The Home "directory" has these features:

-rwxr-xr-x   1 root root 479K Sep 23 17:09 Home

Is it normal or I did a mistake?

Regards.

4
  • 1
    Possible duplicate of How do I navigate between directories in terminal?
    – kos
    Oct 10, 2015 at 10:29
  • Are you sure it's 'Home', and not 'home'? cd /home should work, but /Home really does not exist. Oct 10, 2015 at 10:34
  • Home directory should always be lowercase /home not /Home
    – Kris
    Oct 10, 2015 at 11:07
  • You are right! I usually get into home with 'cd ~' and the correct directory is whit lowercase "h". I have a .deb file called Home that I thought it was the directory!
    – linofex
    Oct 10, 2015 at 11:18

1 Answer 1

2

To get into your "Home directory" you need to run

cd ~

or

cd $HOME

or

cd /home/$USER

Home directory of the current user is located at /home/<user_name>. The current user name is stored in USER variable. The path to the home directory is stored in HOME variable.

1
  • You can also just type cd in most places.
    – Amint
    Apr 18, 2021 at 17:54

Not the answer you're looking for? Browse other questions tagged .