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?

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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