View Full CompTIA XK0-006 Exam Dumps and Practice Test Dumps.
Question 241
Which command is commonly used to refresh package repository metadata on a Debian-based Linux system?
- apt update
- apt clean
- apt remove
- apt search
Correct Answer: 1
Explanation
The apt update command refreshes the local package information from configured repositories. It does not normally install or upgrade packages. Instead, it downloads current package metadata so the system knows which package versions are available. Administrators should usually run apt update before installing packages or performing upgrades. If repository configuration is incorrect, this command may report errors that need to be resolved. Keeping repository metadata current helps ensure that package management operations use accurate information.
Question 242
Which command upgrades installed packages on a Debian-based Linux system?
- apt refresh
- apt upgrade
- apt sync
- apt packages
Correct Answer: 2
Explanation
The apt upgrade command installs newer available versions of installed packages while generally avoiding changes that require removing installed packages. A common maintenance process is to run apt update first and then apt upgrade. Administrators should review the packages that will be changed before confirming important production updates. Regular package upgrades help apply bug fixes and security updates. However, major system changes should be planned carefully because updates can sometimes affect services or application compatibility.
Question 243
Which package manager is commonly associated with Red Hat Enterprise Linux and compatible distributions?
- pacman
- apk
- dnf
- zypper
Correct Answer: 3
Explanation
dnf is a common package management tool used by Red Hat Enterprise Linux and several related distributions. It can install, update, remove, and search for software packages while resolving dependencies. For example, administrators can use dnf install to install a package. Understanding the package manager used by a distribution is important because commands and repository configuration differ between Linux families. Administrators should use official repositories or trusted sources when installing software on production systems.
Question 244
Which command verifies the integrity of files installed by an RPM package?
- rpm -V
- rpm -L
- rpm -C
- rpm -S
Correct Answer: 1
Explanation
The rpm -V command verifies installed files against information stored in the RPM package database. It can help identify changes to file size, permissions, ownership, checksums, or other attributes. This is useful when investigating unexpected file modifications or possible package corruption. A verification difference does not automatically mean the system has been compromised because legitimate configuration changes can also modify package-managed files. Administrators should investigate the specific differences and compare them with expected system configuration.
Question 245
Why are package repository GPG signatures important?
- They increase CPU speed.
- They verify package authenticity and integrity.
- They automatically create backups.
- They assign IP addresses.
Correct Answer: 2
Explanation
GPG signatures help package managers verify that packages or repository metadata come from a trusted source and have not been modified unexpectedly. This provides protection against certain forms of tampering and unauthorized package distribution. Administrators should avoid disabling signature verification simply to make a package installation succeed. If a signature error occurs, the correct approach is to investigate repository configuration, trusted keys, and package source. Secure package management is an important part of maintaining the Linux software supply chain.
Question 246
Which systemd command tells systemd to reload unit files after an administrator creates or changes a unit configuration?
- systemctl reload-units
- systemctl refresh
- systemctl daemon-reload
- systemctl units-update
Correct Answer: 3
Explanation
systemctl daemon-reload tells systemd to reload its unit configuration files. It is commonly required after creating or modifying a custom service unit. This operation does not necessarily restart the affected service. After reloading the systemd configuration, an administrator may need to start or restart the service separately. Forgetting daemon-reload can cause systemd to continue using an older version of a unit definition, which may make troubleshooting confusing.
Question 247
Which systemd feature allows an administrator to prevent a service from being started manually or automatically?
- Masking
- Logging
- Mounting
- Aliasing
Correct Answer: 1
Explanation
Systemd masking prevents a unit from being started by creating a link that effectively makes the unit unavailable for activation. This is stronger than simply disabling a service at boot. For example, an administrator may mask a service that must not run on a particular server. The command systemctl mask is used for this purpose. When the service is needed again, systemctl unmask can remove the restriction. Administrators should understand the difference between stopping, disabling, and masking services.
Question 248
What is the main difference between restarting and reloading a service?
- Reloading always shuts down the entire operating system.
- Restarting reads only user shell settings.
- Reloading can apply configuration changes without fully stopping the service.
- Restarting only changes file permissions.
Correct Answer: 3
Explanation
Reloading a service asks it to reread its configuration while keeping the service running when the application supports this behavior. Restarting stops and starts the service again. Reloading can reduce service interruption because existing processes may continue running. However, not every application supports configuration reloads, and some changes require a complete restart. Administrators should check the service documentation and systemd unit behavior before choosing between reload and restart, especially for production services where downtime matters.
Question 249
Which file is commonly used to define authentication modules and authentication rules on many Linux systems?
- /etc/pam.conf
- /etc/authentication
- /etc/login.modules
- /etc/security/auth
Correct Answer: 1
Explanation
PAM, or Pluggable Authentication Modules, provides a framework for authentication and related account controls. Linux systems can use /etc/pam.conf, although many modern distributions organize PAM configuration under /etc/pam.d/. PAM can control authentication, account restrictions, password policies, and session behavior. Administrators should modify PAM configuration carefully because an incorrect rule can prevent users, including administrators, from logging in. Changes should be tested in a controlled way and backup copies should be kept before editing authentication configuration.
Question 250
Which Linux security framework is commonly used to apply mandatory access control policies on Red Hat-based systems?
- AppArmor
- SELinux
- TCP Wrappers
- PAM
Correct Answer: 2
Explanation
SELinux, or Security-Enhanced Linux, provides mandatory access control using security policies and labels. It can restrict what processes are allowed to access even when traditional Unix permissions would normally permit the action. SELinux is widely used in Red Hat-based environments. Administrators can check its current mode with commands such as getenforce. When troubleshooting SELinux-related access problems, administrators should review audit logs and policy messages instead of immediately disabling SELinux.
Question 251
Which Linux security framework is commonly associated with profile-based mandatory access control and is widely used on Ubuntu?
- AppArmor
- SELinux
- Kerberos
- OpenSSL
Correct Answer: 1
Explanation
AppArmor is a Linux security framework that uses profiles to restrict what applications can access and what actions they can perform. It is commonly enabled on Ubuntu and other Linux distributions. Profiles can define allowed files, capabilities, and operations for specific applications. When an application is unexpectedly denied access, administrators should inspect AppArmor status and logs to identify the relevant profile rule. AppArmor provides an additional security layer beyond traditional Unix permissions.
Question 252
Which command can show the current status of AppArmor profiles on a supported Linux system?
- apparmor-status
- app-status
- aa-check
- profile-status
Correct Answer: 1
Explanation
The apparmor-status command can display information about loaded AppArmor profiles and their current enforcement state on systems that provide the utility. This can help administrators determine whether an application is protected by AppArmor and whether a profile is enforcing or operating in a less restrictive mode. When troubleshooting access problems, checking the profile status should be combined with reviewing logs and application behavior. Administrators should avoid disabling security controls without understanding why a denial occurred.
Question 253
What is the main purpose of the Linux auditd service?
- To manage DNS zones
- To record security-related audit events
- To compress system files
- To assign network addresses
Correct Answer: 2
Explanation
The auditd service provides Linux auditing capabilities and can record security-related events such as authentication activity, file access, permission changes, and system calls according to configured rules. Audit records can help administrators investigate security incidents and demonstrate compliance with organizational requirements. The audit system is different from normal application logging because it focuses on security and system activity. Administrators should configure appropriate rules and monitor audit logs because excessive logging can consume storage and affect system performance.
Question 254
Which command can display the current Linux audit rules?
- auditshow
- auditctl -l
- showaudit -r
- audit-rules
Correct Answer: 2
Explanation
The auditctl -l command lists the currently loaded Linux audit rules. These rules determine which activities the audit system monitors. Administrators can use this command when reviewing security monitoring configuration or troubleshooting why a particular event is or is not being recorded. Audit rules should be designed carefully because overly broad rules can generate large amounts of data. Persistent audit configuration may be stored separately depending on the distribution and should be reviewed when maintaining security policies.
Question 255
Which file permission feature causes newly created files in a shared directory to inherit the directory’s group ownership?
- Setuid
- Sticky bit
- Setgid
- ACL mask
Correct Answer: 3
Explanation
The setgid bit on a directory causes newly created files and subdirectories to inherit the directory’s group ownership on systems using normal Unix group inheritance behavior. This is useful for shared project directories where multiple users need to work with files under a common group. The setgid bit is different from setuid and the sticky bit. Administrators should combine it with appropriate group permissions and access controls so that users can collaborate without receiving unnecessary privileges.
Question 256
What is the primary purpose of the sticky bit on a shared directory such as /tmp?
- It prevents users from deleting files owned by other users.
- It makes every file executable.
- It changes all files to root ownership.
- It encrypts directory contents.
Correct Answer: 1
Explanation
The sticky bit on a directory restricts file deletion so that users generally cannot remove or rename files owned by another user, even when the directory is writable by multiple users. This is why shared directories such as /tmp commonly use the sticky bit. Without this protection, one user could potentially remove another user’s files from a world-writable directory. The sticky bit does not encrypt data or make files executable; it controls deletion and rename behavior within the directory.
Question 257
Which command can display the current firewall rules when using nftables?
- nft list ruleset
- nft show firewall
- firewall-rules –nft
- nft display
Correct Answer: 1
Explanation
The nft list ruleset command displays the current nftables ruleset. Administrators can use it to inspect tables, chains, rules, and filtering behavior. This is particularly useful when troubleshooting whether traffic is being accepted or blocked. A firewall issue should be investigated together with service status, listening ports, routing, and network connectivity because the firewall may not be the actual cause. Administrators should make controlled rule changes and verify the resulting behavior carefully.
Question 258
Which command can check whether a local TCP port is accepting connections?
- portcheck
- nc
- tcp-test
- connect-port
Correct Answer: 2
Explanation
The nc, or netcat, utility can test network connections to specific hosts and ports. For example, nc -zv server.example.com 443 can help determine whether a TCP connection can be established to port 443. This is useful when troubleshooting services that appear to be running but cannot be reached remotely. A successful connection does not prove that the application is functioning correctly, but a failed connection provides useful evidence for investigating routing, firewall rules, service listeners, or network problems.
Question 259
Which command can display the routing table using the modern ip utility?
- ip route
- ip gateway
- ip table
- route-list
Correct Answer: 1
Explanation
The ip route command displays the system’s routing table. It shows information such as destination networks, gateways, interfaces, and default routes. This is important when troubleshooting connectivity because a host needs an appropriate route to reach remote networks. Administrators should check the routing table before assuming that DNS or firewall configuration is responsible for a connection problem. A missing or incorrect default route can prevent communication with networks outside the local subnet.
Question 260
Which networking problem is most directly indicated when a host can reach an IP address but cannot resolve a hostname?
- CPU overheating
- DNS resolution failure
- Filesystem corruption
- Incorrect file ownership
Correct Answer: 2
Explanation
If a host can successfully communicate with an IP address but cannot resolve the corresponding hostname, DNS resolution is a likely area to investigate. Administrators can check resolver configuration, DNS server reachability, search domains, and tools such as dig or getent. This helps separate DNS problems from routing or firewall problems. If direct IP connectivity works, the network path may already be functional. The administrator should then focus on name resolution rather than immediately changing unrelated network settings.