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?


1 Answer 1


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.

  • The ~ is superfluous
    – Milliways
    Commented Jul 28, 2019 at 9: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
    Commented Jul 28, 2019 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.