Skip to content

Instantly share code, notes, and snippets.

@graceavery
Last active February 6, 2026 23:09
Show Gist options
  • Select an option

  • Save graceavery/01ec404e555571a4a668c271c8f62e8b to your computer and use it in GitHub Desktop.

Select an option

Save graceavery/01ec404e555571a4a668c271c8f62e8b to your computer and use it in GitHub Desktop.
bash aliases for Harry Potter enthusiasts
alias accio=wget
alias avadaKedavra='rm -f'
alias imperio=sudo
alias priorIncantato='echo `history |tail -n2 |head -n1` | sed "s/[0-9]* //"'
alias stupefy='sleep 5'
alias wingardiumLeviosa=mv
alias sonorus='set -v'
alias quietus='set +v'
alias colloportus='openssl enc -aes-256-cbc' # locking spell! $colloportus -in unencryptedName -out encryptedName
alias alohamora='openssl enc -d -aes-256-cbc' # unlocking spell! $alohamora -in encryptedName -out unencryptedName
alias reducio='zip -r' # $reducio zippedName thingToZip
alias engorgio=unzip # $engorgio zippedName
alias legilimens='defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder' # see the hidden thoughts!
alias occlumens='defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder' # keep hidden things hidden!
alias obliviate='history -c; history -w' # clear bash history
alias obscuro='/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend' # lock screen
alias tergeo='defaults write com.apple.finder CreateDesktop -bool false && killall Finder' # makes surfaces clean!
alias untergeo='defaults write com.apple.finder CreateDesktop -bool true && killall Finder' # (this one isn't canon)
alias expectoPatronum='open ~/Pictures/turtleBasking.jpg' # summon your spirit animal! (replace with a picture of your own spirit animal)
function bodyBindCurse() {
alias cd='echo "you are immobilized! you cannot get to"'
}
function blindingCurse() {
alias ls='echo "you have been blinded!"'
}
@vinaysshenoy

Copy link
Copy Markdown

Nice!

I do have a suggestion, however. Wouldn't locomotor be a better alias for mv than wingardiumLeviosa?

@iKlsR

iKlsR commented Jun 12, 2016

Copy link
Copy Markdown

diffindo for renaming, cutting, moving
evanesco is somewhat more accurate than avada kedavra
avadaKedavra - pkill maybe too long?
relashio - unlink
pack - zip
reducio - unzip
nox - shutdown
aparecium - ls -a
crucio - git rebase
mosmordre - vim/emacs

@kgadek

kgadek commented Jun 12, 2016

Copy link
Copy Markdown

I'd like to report an issue, as avadaKedavra is to feeble. This should be alias avadaKedavra='rm --no-preserve-root -rf'.

@jammaloo

Copy link
Copy Markdown

sectumsempra - cut

@dallas

dallas commented Jun 13, 2016

Copy link
Copy Markdown

mischiefManaged - sudo pkill loginwindow

@bhanuvrat

Copy link
Copy Markdown

brilliant !!

@gabrielseco

Copy link
Copy Markdown

I would replace avadaKedavra with avada.

@dnnsmnstrr

Copy link
Copy Markdown

For macOS users:

alias lumos="osascript -e 'tell app \"System Events\" to tell appearance preferences to set dark mode to false'"
alias nox="osascript -e 'tell app \"System Events\" to tell appearance preferences to set dark mode to true'"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment