<p>Sudo. It is often used by Linux users to perform commands with root privileges instead of being in a root shell all the time. However, <ahref="https://access.redhat.com/security/cve/CVE-2023-22809">there has recently been a vulnerability in sudo due to which people are switching to doas.</a></p>
<h2><iclass="fa fa-question-circle"aria-hidden="true"></i>What is Doas?</h2>
<p>OpenDoas or Doas is a portable version of the doas utility that is used on OpenBSD. OpenDoas can be installed on Unix-like system which includes Linux. It is designed to be more minimal and has less configuration options than sudo. If you are on a personal computer, then I highly recommend you switch to doas because it has a much smaller codebase which leaves less room for error.</p>
<p>However, if you are part of a professional environment with many individuals needing to use sudo, I recommend staying with sudo because it offers more configuration options to be used for groups and users.</p>
<p>You have to configure doas as it is not included in most distributions by default but do not fret! One of its plus points is that its configuration is much better than sudo's.</p>
<p>To begin, edit the /etc/doas.conf file as root.</p>
<p>If you are the only user on your system and do not plan to allow other users to use your system, this line will suffice.</p>
<p><code>permit persist username as root</code></p>
<p>Many distributions have a group (wheel, sudoers) that are allowed to run sudo commands. If you would like to allow that group to send commands as root, type this:</p>
<p>If you are the only person on your Linux machine, you should switch to doas. It is much more lightweight and is similar to sudo. It has a smaller codebase which, in my opinion, prevents exploits from popping up as often as sudo.</p>
<p>However, if you are in a professional environment, you should stick with sudo.</p>
<p><ahref="mailto:sufyaan@counterhawks.com?subject=Use%20Doas%20Instead%20Of%20Sudo">>>> Reply To Me</a></p>