sudo - CI/CD用語集の定義
sudo("superuser do")は、/etc/sudoers のポリシーを確認したうえで、単一のコマンドを別のユーザー(通常は root)として実行します。コマンドを記録し、一時的に権限を得る標準的な方法です。
CI での扱い
GitHub がホストする runner はパスワードなしの sudo を許可しているので、sudo apt-get install が動作します。root として実行される container の内部では、sudo が存在せず不要な場合があり、その状態で呼び出すと sudo: command not found で失敗します。
関連ガイド
Root User - CI/CD Glossary DefinitionRoot User: The root user is the superuser account (UID 0) on Unix-like systems, exempt from permission checks…
File Permissions - CI/CD Glossary DefinitionFile Permissions: File permissions are the read, write, and execute bits (rwx) the OS checks before allowing…