⚠️at this moment ftutorials is still a rolling release documentation, things change often!⚠️



Migration to doas#

As an lightweight alternative to sudo you can use doas.

See also

  • doas - ArchWiki [1]

  • doas - ArchWiki - doas persist feature [2]


doas does not seem to be production ready. See [2]

  1. install the package

    apt-get install doas
  2. configure doas. Replace USER with your user

    1permit keepenv setenv { XAUTHORITY LANG LC_ALL } :wheel
    2permit persist keepenv ${USER}
  3. test it

    doas -s
  4. use this bash alias and function to convert sudo and sudo -i to the doas equivalents

    1function doas_to_sudo_interactive() {
    2    # rename alias
    3    [ "${1}" = '-i' ] && doas -s || doas ${1}
    5alias sudo='doas_to_sudo_interactive'
  5. If you want to remove sudo you have to set an environment variable first

    apt purge sudo