How to fix Alpine Linux -ash: sudo: not found
Many users who are used to classical Linux distributions will see the following error message when using sudo on Alpine Linux:
alpine_sudo_error.txt
-ash: sudo: not foundYou don’t need sudo in many use cases!
The easiest way to fix that is to just run the command as root.
In order to get into a root shell (if you are not already logged in as root), use
enter_root_shell.sh
suwhich expects you to enter the root password.
Now just run the original command without sudo.
Still want to install sudo?
If you still want to install sudo, just run
install_sudo_alpine.sh
apk add sudoThis is often the best approach if you have e.g. scripts that are running sudo commands.
Check out similar posts by category:
Alpine Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow