If I try to cd ˜/
it responds:
-bash: "cd: ˜/: No such file or directory"
I also don't seem to have a .bash_profile
or .profile
.
If I try to cd ˜/
it responds:
-bash: "cd: ˜/: No such file or directory"
I also don't seem to have a .bash_profile
or .profile
.
That's the wrong tilde character. You typed a "small tilde" (unicode U+02DC), when you want a plain ASCII tilde character (unicode U+007E). Compare the following commands:
cd ~ # plain tilde: this works
cd ˜ # small tilde: doesn't work, because there's no file named "˜"
In your Mac keyboard if you type shift+` or option+n then you will get ˜
.
If you want to type ~
use shift +`+spacebar.
If you use US International keyboard layout like me, this may solve your problem:
Right after pressing shift
+˜
, press space
.
If you just keep typing the path with forward slash, the terminal will interpret your tilde like a small tilde instead of the normal one. This happens because it tries to combine both characters into one instead of just inputing what you typed.