DEV Community

Paul Barker
Paul Barker

Posted on

A quick bash/zsh tip

! 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"
Enter fullscreen mode Exit fullscreen mode

... and a few others.

Top comments (1)

vaviloff profile image

Nice tip!