A quick bash/zsh tip

pbarker

Paul Barker

Posted on April 19, 2024

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.

💖 💪 🙅 🚩
pbarker
Paul Barker

Posted on April 19, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

A quick bash/zsh tip
linux A quick bash/zsh tip

April 19, 2024