Fix `zsh: permission denied: ..` going up one directory
June 14, 2022 ‐ 1 min read
If you try to move up one directory in your Zsh shell using the ..
but see the stated permission denied error there is a good chance you are used to an Oh-My-Zsh alias.
The ..
command is not an existing Zsh shell command, thus you can expect the following to happen in a plain Zsh shell.
$ ..
zsh: permission denied: ..
But luckily, if Zsh can do this then so can we. We can make this work again by adding a Zsh shell alias to our ~/.zshrc
file. In which we create an alias for cd ..
as ..
.
# ~/.zshrc
alias ..='cd ..'
Do not forget to source your ~/.zshrc
file after making the change, or to restart your shell.