Skip to content

Instantly share code, notes, and snippets.

@devloco
Created May 18, 2019 16:28
Show Gist options
  • Save devloco/926df8e65e1d8a9afa688a46dcb85fda to your computer and use it in GitHub Desktop.
Save devloco/926df8e65e1d8a9afa688a46dcb85fda to your computer and use it in GitHub Desktop.
Useful Bash aliases
# Did you forget to use "sudo" with a command? Use this alias to auto add sudo and re-run it.
# usage example:
# > apt update
# Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
# > oops
# (now your previous command runs with sudo)
alias oops='sudo $(fc -ln -1)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment