Free XK0-006 Exam Braindumps
CompTIA Linux+ Questions 49–56 (page: 8)

Updated On: 30-Apr-2026

A systems administrator needs to enable routing of IP packets between network interfaces. Which of the following kernel parameters should the administrator change?

  1. net.ipv4.ip_multicast
  2. net.ipv4.ip_route
  3. net.ipv4.ip_local_port_range
  4. net.ipv4.ip_forward

Answer(s): D

Explanation:

The net.ipv4.ip_forward kernel parameter controls whether the Linux kernel can forward IP packets between network interfaces, enabling routing functionality when set to 1.



A Linux user frequently tests shell scripts located in the /home/user/scripts directory. Which of the following commands allows the user to run the program by invoking only the script name?

  1. export SHELL=$SHELL=/home/user/scripts
  2. export TERM=$TERM=/home/user/scripts
  3. export PATH=$PATH:/home/user/scripts
  4. export alias /home/user/scripts='/bin'

Answer(s): C

Explanation:

By appending /home/user/scripts to the PATH environment variable, the user can execute scripts from that directory by simply typing the script name without specifying the full path.



A systems administrator needs to check the statuses of all the services on a Linux server. Which of the following commands accomplishes this task?

  1. systemctl is-active --services
  2. systemctl list-sockets --type-services
  3. systemctl is-enabled --services
  4. systemctl list-units --type-services

Answer(s): D

Explanation:

The systemctl list-units --type=service command displays all loaded service units and their statuses (running, exited, failed, etc.), allowing the administrator to check the state of all services on the server.



Which of the following cryptographic functions ensures a hard drive is encrypted when not in use?

  1. GPG
  2. LUKS
  3. PKI certificates
  4. OpenSSL

Answer(s): B

Explanation:

LUKS (Linux Unified Key Setup) provides full-disk encryption, ensuring that the data on a hard drive is protected and unreadable when the system is powered off or the drive is not in use.



Which of the following most accurately describes a webhook?

  1. An authentication method for web-server communication
  2. An SNMP-based API for network device monitoring
  3. A means to transmit sensitive information between systems
  4. An HTTP-based callback function

Answer(s): D

Explanation:

A webhook is an HTTP-based callback that allows one system to send real-time data or notifications to another system when an event occurs.



An administrator attempts to install updates on a Linux system but receives error messages regarding a specific repository. Which of the following commands should the administrator use to verify that the repository is installed and enabled?

  1. yum repo-pkgs
  2. yum list installed repos
  3. yum reposync available
  4. yum repolist all

Answer(s): D

Explanation:

The yum repolist all command lists all configured repositories along with their status (enabled or disabled), allowing the administrator to verify if the problematic repository is installed and active.



Which of the following is the main reason for setting up password expiry policies?

  1. To avoid using the same passwords repeatedly
  2. To mitigate the use of exposed passwords
  3. To force usage of passwordless authentication
  4. To increase password strength and complexity

Answer(s): B

Explanation:

Password expiry policies ensure that even if a password has been compromised, its period of validity is limited, reducing the risk of long-term unauthorized access.



A Linux administrator is making changes to local files that are part of a Git repository. The administrator needs to retrieve changes from the remote Git repository. Which of the following commands should the administrator use to save the local modifications for later review?

  1. git stash
  2. git pull
  3. git merge
  4. git fetch

Answer(s): A

Explanation:

The git stash command temporarily saves local modifications without committing them, allowing the administrator to safely run git pull or git fetch later and then reapply the saved changes.



Viewing page 8 of 19
Viewing questions 57 - 64 out of 160 questions


Post your Comments and Discuss CompTIA XK0-006 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!