1

Whenever I try to change the directory to pi, using the command $ cd ~, it displays the error:

bash:  $:  command not found

Why is this not working?

Aurora0001
  • 6,308
  • 3
  • 23
  • 38

1 Answers1

4

The command you need to enter is cd ~

The $ is just a common prompt from the shell that it is awaiting a command, it is not meant to be typed as part of the command.

joan
  • 71,024
  • 5
  • 73
  • 106
  • The ~ is superfluous – Milliways Jul 28 '19 at 09:32
  • 2
    It is usually superfluous when used with cd. I'm not going to say it's always superfluous though as that depends on whether it's a built-in and the shell being used and which environment variables are set. – joan Jul 28 '19 at 09:43