CKS System Hardening Practice Question
Which of the following is the correct command to load an AppArmor profile from a file named 'my-profile'?
⚠ Common exam trap
Many exam-takers confuse `apparmor_parser` with a hypothetical `apparmor_load` command or misuse the `-R` flag, thinking it stands for 'run' or 'reload' instead of 'remove'.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
apparmor_parser my-profile
The correct command to load an AppArmor profile from a file is `apparmor_parser my-profile`. The `apparmor_parser` tool is used to load, replace, or remove AppArmor profiles into the kernel. When invoked without flags, it loads the profile from the specified file into the kernel's AppArmor security module, enforcing the defined access controls.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
apparmor_load my-profile
Why it's wrong here
apparmor_load is not a real AppArmor utility; no such binary exists in the apparmor user-space packages. To activate a profile, you must use apparmor_parser, which parses the profile's syntax and loads the compiled policy into the kernel. The nonexistent command name seems plausible but will simply return 'command not found.'
- ✓
apparmor_parser my-profile
Why this is correct
apparmor_parser my-profile is the correct way to load an AppArmor profile: it reads the profile file, validates its syntax, compiles it into binary policy, and writes it to the kernel's AppArmor securityfs interface. Once loaded, the kernel enforces the profile's rules against the target process. This command is the standard tool for both loading and replacing profiles (the -a flag explicitly adds a profile).
- ✗
apparmor_parser -R my-profile
Why it's wrong here
The -R flag on apparmor_parser stands for remove, not load; issuing apparmor_parser -R my-profile unloads the named profile from the kernel, removing its enforcement. Since the goal is to load an application's profile, this flag has the opposite effect. To load, omit -R or explicitly use -a (add).
- ✗
systemctl start apparmor my-profile
Why it's wrong here
systemctl start apparmor my-profile is invalid because systemctl manages system services rather than individual AppArmor profiles; the start verb starts the AppArmor service unit, and any extra arguments are treated as additional unit names, not profile files. While starting the apparmor service may load profiles from the configured paths, it cannot load an arbitrary profile by name. For per-profile loading, apparmor_parser is required.
Go deeper
Related to this question
About these practice questions
One of 845 original CKS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKS practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKS exam.