A quick bash/zsh tip

RMAG news

! is a valid character in an alias. I use it to mark aliases which run under sudo, for example on my Debian box I have:

alias e!=”sudo ${EDITOR}”
alias a!=”sudo apt”
alias s!=”sudo systemctl”
alias in!=”sudo apt install”

… and a few others.

Leave a Reply

Your email address will not be published. Required fields are marked *