Skip to content

Instantly share code, notes, and snippets.

@omamkaz
Created March 17, 2024 20:12
Show Gist options
  • Save omamkaz/4a96a3edc4318293b046c9f2ab548f54 to your computer and use it in GitHub Desktop.
Save omamkaz/4a96a3edc4318293b046c9f2ab548f54 to your computer and use it in GitHub Desktop.
Fixing: sudo: [alias]: command not found
sudo() {
if alias "$1" &> /dev/null; then
command sudo $(alias $1 | cut -d '=' -f 2) ${@:2}
else
command sudo "$@"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment