now | blog | wiki | recipes | bookmarks | contact | about | donate
* * * back home * * *
doas is a small replacement for sudo
2024-09-20
Over the last few years, I have transitioned a lot of my stuff over to using doas
instead of sudo
on my GNU/Linux machines and servers. doas
is a utility from the OpenBSD world.
doas
is super easy to setup. I'm running on Debian 12, and installed it like so:
sudo apt update; sudo apt install -y opendoas
When it is installed, you can get up and running by getting your doas.conf
file setup. Here's a few lines we can use to get it done:
#!/usr/bin/env bash
# create /etc/doas.conf file
sudo touch /etc/doas.conf
# allow $USER to run root commands
echo "permit persist "${USER}" as root" | sudo tee /etc/doas.conf
Now, you should be good to go! Test doas
by running a quick command with it:
doas echo "Hello from doas!"
If you were prompted for your password and saw the line printed, then doas
is setup and good to go. You can now use it anywhere you would normally use sudo
.
This week, I have been reading The Ballad of Songbirds and Snakes by Suzanne Collins.