DOAS(1)
โจ DOAS(1) โจ โ General Commands Manual, bestie edition ๐
okay so. this is the manual page for doas from the General Commands Manual section, and honestly? she's iconic. let's get into it ๐ซถ
๐ธ NAME ๐ธ
doas โ execute commands as another user
yes literally that's it, that's the whole vibe: you wanna run a command as somebody else, doas is your girl ๐
๐ SYNOPSIS ๐
doas [-Lns] [-C config] [-u user] command [args]
๐ DESCRIPTION ๐
The doas utility executes the given command as another user. The command argument is mandatory unless -C, -L, or -s is specified. so like, you can't just vibe in there with no command, bestie, unless you brought one of those three flags with you โจ
The user will be required to authenticate by entering their password, unless configured otherwise. yes, the password. the whole point. ๐
By default, a new environment is created. The variables HOME, LOGNAME, PATH, SHELL, and USER and the umask(2) are set to values appropriate for the target user. DOAS_USER is set to the name of the user executing doas. The variables DISPLAY and TERM are inherited from the current environment. This behavior may be modified by the config file. The working directory is not changed. periodt.
The options are as follows:
-Cconfig โ Parse and check the configuration file config, then exit. Ifcommandis supplied, doas will also perform command matching. In the latter case either โpermitโ, โpermit nopassโ or โdenyโ will be printed on standard output, depending on command matching results. No command is executed. it's giving "just checking, not doing" ๐ต๏ธโ๏ธ-Lโ Clear any persisted authentications from previous invocations, then immediately exit. No command is executed. bye bye leftover auth, so cleansing โจ-nโ Non interactive mode, fail if the matching rule doesn't have thenopassoption. no password prompts here, it either works or it doesn't ๐-sโ Execute the shell fromSHELLor/etc/passwd.-uuser โ Execute the command as user. The default isroot. ๐
๐ฅ EXIT STATUS ๐ฅ
The doas utility exits 0 on success, and >0 if an error occurs. It may fail for one of the following reasons:
- The config file
/etc/doas.confcould not be parsed. - The user attempted to run a command which is not permitted.
- The password was incorrect.
- The specified command was not found or is not executable.
so if it didn't work, it's one of those four, no cap ๐ญ
๐ SEE ALSO ๐
๐ฆ HISTORY ๐ฆ
The doas command first appeared in OpenBSD 5.8. vintage but still serving ๐
๐ AUTHORS ๐
Ted Unangst <tedu@openbsd.org>
and that's the whole page bestie!! this one ships in the Debian build, dated January 16, 2021 โ so like, an older drop but the tea is still hot ๐ go run something as root (responsibly, or at least with a config file) mwah ๐๐งโโ๏ธ
๐ฆ where this page comes from
- alpine 3.22: doas-doc 6.8.2-r8 ยท ISC
- alpine 3.23: doas-doc 6.8.2-r8 ยท ISC
- alpine 3.24: doas-doc 6.8.2-r8 ยท ISC
- arch rolling: opendoas 6.8.2-3 ยท custom:ISC
- debian bookworm: opendoas 6.8.2-1+b1 ยท ISC
- debian trixie: opendoas 6.8.2-1+b1 ยท ISC
- fedora 43: opendoas 6.8.2-9.fc43 ยท ISC AND BSD-3-Clause
- fedora 44: opendoas 6.8.2-10.fc44 ยท ISC AND BSD-3-Clause
- nixos 26.05: doas 6.8.2
- nixpkgs unstable: doas 6.8.2
- ubuntu jammy: doas 6.8.1-3 ยท ISC
- ubuntu noble: opendoas 6.8.2-1 ยท ISC
- ubuntu questing: opendoas 6.8.2-1
- ubuntu resolute: opendoas 6.8.2-1build1 ยท ISC
- ubuntu stonking: opendoas 6.8.2-1build1 ยท ISC
- Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms