20+ practice questions focused on Security — one of the most tested topics on the CompTIA Linux+ (XK0-006) exam. Each question includes a detailed explanation so you learn why the right answer is correct.
Start Security PracticeAn administrator needs to add a new user named 'jdoe' with a home directory and default group. Which command should be used?
Explanation: The useradd command creates a new user. On most Linux distributions, the default configuration (/etc/default/useradd) is set to create a home directory. The command 'useradd jdoe' will create a home directory /home/jdoe and assign the user's own group as the primary group. While the -m option explicitly enforces home directory creation, the default behavior is sufficient. The other options do not add a user: groupadd adds a group, passwd sets a password, and usermod modifies an existing user.
A Linux administrator is troubleshooting a service that fails to start. The audit.log shows an AVC denial related to the httpd_t domain. The administrator wants to see the full denial message and generate a policy to allow the access. Which two commands should be used in conjunction?
Explanation: `ausearch` retrieves the full AVC denial message from the audit log, and `audit2allow` generates a policy module to allow the denied access. Together, they enable the administrator to first identify the exact denial and then create a custom SELinux policy to permit the httpd_t domain's blocked action.
An administrator wants to ensure that the Apache web server can only listen on port 443 (HTTPS) and not on port 80, enforced by SELinux. Which SELinux boolean should be set to allow Apache to use port 443?
Explanation: SELinux already defines port 443 as an allowed port for the Apache web server under the port context 'http_port_t'. No boolean change is needed to enable Apache to listen on port 443. The other booleans are unrelated: httpd_use_nfs controls NFS access, httpd_can_network_connect controls outbound connections, and httpd_enable_homedirs controls user home directory access.
An administrator needs to generate a self-signed certificate and private key for a web server. Which openssl command accomplishes this?
Explanation: It first generates a 2048-bit RSA private key using `openssl genrsa`, then uses `openssl req -new -x509` to create a self-signed X.509 certificate directly from that key, bypassing the need for a Certificate Signing Request (CSR). The `-x509` flag tells OpenSSL to output a self-signed certificate instead of a CSR, and `-days 365` sets the validity period. This two-step process produces both the private key (`key.pem`) and the self-signed certificate (`cert.pem`) required for a web server.
A Linux server fails to boot after an administrator edits /etc/selinux/config and sets SELINUX=disabled. What is the most likely reason for the boot failure?
Explanation: Setting SELINUX=disabled in /etc/selinux/config is syntactically correct, but the configuration file also requires the SELINUXTYPE parameter to specify the policy type (e.g., targeted). Without SELINUXTYPE set, the SELinux initialization code may fail to parse the configuration, leading to a boot failure. The other options either describe actions that contradict the stem or are not likely to cause a boot failure.
+15 more Security questions available
Practice all Security questions1. Baseline your knowledge
Start with 10 questions to gauge your current understanding of Security. This tells you whether you need a concept refresher or just practice.
2. Review every explanation
For each question — right or wrong — read the full explanation. Understanding why an answer is correct is more valuable than knowing the answer itself.
3. Focus on exam traps
Security questions on the XK0-006 frequently use trap wording. Look for subtle differences in answers that test your precision, not just general knowledge.
4. Reach 80% consistently
Do repeated sessions until you score 80%+ three times in a row. Then move to mixed-mode practice to test cross-topic recall under realistic conditions.
The exact number varies per candidate. Security is tested as part of the CompTIA Linux+ (XK0-006) blueprint. Practicing with targeted Security questions ensures you can handle any format or difficulty that appears.
Yes. Courseiva provides free XK0-006 practice questions across all exam topics and domains. The platform includes topic-based practice, mock exams, missed-question review, bookmarked questions, and readiness tracking — no account required.
Difficulty is subjective, but Security is a high-priority exam concept tested in multiple ways — direct recall, scenario analysis, and command-output interpretation. Consistent practice is the best way to build confidence.
Launch a full Security practice session with instant scoring and detailed explanations.
Start Security Practice →