For an LLM comparison, this is what I get from haiku
sudo is older, more complex, and feature-rich, while doas is newer, simpler, and security-focused.
Core distinctions:
Code size & complexity: doas has roughly 700 lines of code versus sudo’s 100,000+ lines, making doas easier to audit and maintain.
Configuration: sudo uses the complex sudoers file with intricate syntax; doas uses a simpler doas.conf file that’s more straightforward to read and write.
Security philosophy: doas was designed with security-first principles, minimizing potential attack surface. sudo accumulated features over decades, increasing complexity and potential vulnerabilities.
Feature set: sudo has advanced features like session recording, plugins, authentication caching, and detailed logging. doas is minimalist—it handles the essential privilege escalation task without extras.
Adoption: sudo is ubiquitous across Linux and Unix systems. doas is less common but gaining traction, particularly on OpenBSD (where it originated) and among security-conscious users.
Performance: doas is faster and lighter, while sudo carries more overhead.
In practice, doas works well for straightforward privilege escalation needs, while sudo is better if you need advanced features or broader compatibility.
For an LLM comparison, this is what I get from haiku
sudois older, more complex, and feature-rich, whiledoasis newer, simpler, and security-focused.Core distinctions:
Code size & complexity:
doashas roughly 700 lines of code versussudo’s 100,000+ lines, makingdoaseasier to audit and maintain.Configuration:
sudouses the complexsudoersfile with intricate syntax;doasuses a simplerdoas.conffile that’s more straightforward to read and write.Security philosophy:
doaswas designed with security-first principles, minimizing potential attack surface.sudoaccumulated features over decades, increasing complexity and potential vulnerabilities.Feature set:
sudohas advanced features like session recording, plugins, authentication caching, and detailed logging.doasis minimalist—it handles the essential privilege escalation task without extras.Adoption:
sudois ubiquitous across Linux and Unix systems.doasis less common but gaining traction, particularly on OpenBSD (where it originated) and among security-conscious users.Performance:
doasis faster and lighter, whilesudocarries more overhead.In practice,
doasworks well for straightforward privilege escalation needs, whilesudois better if you need advanced features or broader compatibility.