DEV Community

Paul Barker
Paul Barker

Posted on

1

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)

Collapse
 
vaviloff profile image
Vaviloff

Nice tip!

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs