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.

linofex
  • 554
  • 9
  • 28
  • 1
    Possible duplicate of [How do I navigate between directories in terminal?](http://askubuntu.com/questions/232442/how-do-i-navigate-between-directories-in-terminal) – kos Oct 10 '15 at 10:29
  • Are you sure it's 'Home', and not 'home'? `cd /home` should work, but /Home really does not exist. – mikewhatever Oct 10 '15 at 10:34
  • Home directory should always be lowercase /home not /Home – Kris Oct 10 '15 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 '15 at 11:18

1 Answers1

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.

Pilot6
  • 88,764
  • 91
  • 205
  • 313