00:15:00

Free CompTIA Linux+ XK0-005 Practice Test

Prepare for the CompTIA Linux+ XK0-005 exam with this free practice test. Randomly generated and customizable, this test allows you to choose the number of questions.

  • Questions: 15
  • Time: 15 minutes (60 seconds per question)
  • Included Objectives:
    System Management
    Security
    Scripting, Containers, and Automation
    Troubleshooting
Change
Question 1 of 15

Pressing Ctrl+Z in a shell sends the SIGSTOP signal to the current foreground process, thus immediately and permanently stopping the process.

  • True

  • False

Question 2 of 15

In the context of Security-Enhanced Linux (SELinux), what term is used to describe the metadata applied to files and processes that defines the security policy aspects such as type, role, user, and level?

  • Label

  • Descriptor

  • Policy identifier

  • Tag

Question 3 of 15

Which command is used to display detailed information about a specific container, including its configuration and current state?

  • docker inspect

  • docker list

  • docker status

  • docker info

Question 4 of 15

An administrator is writing a shell script where the output of a command needs to be both displayed on the screen and written to a file for logging purposes. Which command and operator should the administrator use to achieve this?

  • Appending the output to a file using the >> operator

  • Using the tee command with the | operator

  • Piping the output to another command with the | operator

  • Redirecting output using the > operator

Question 5 of 15

An organization is transitioning to a microservices architecture for their cloud-based application, requiring smooth scaling, high availability, and a unified method of configuration. Which Kubernetes feature allows the organization to manage a group of identically configured containers, ensuring they can be scaled easily in response to demand?

  • Deployment

  • Pod

  • Service

  • StatefulSet

Question 6 of 15

A Linux server with sufficient swap space will never encounter an Out of Memory condition.

  • False

  • True

Question 7 of 15

Which signal is commonly sent by command-line utilities to request a graceful termination of a process?

  • SIGTERM

  • SIGKILL

  • SIGSTOP

  • SIGQUIT

Question 8 of 15

A system administrator notices that an important server is experiencing intermittent problems with data integrity, and suspects filesystem corruption on one of its disks. After running fsck on the unmounted filesystem and fixing several errors, the administrator needs to ensure that the filesystem will be checked and repaired if necessary during the next system boot. Which of the following commands should the administrator use to schedule a filesystem check on boot?

  • e2fsck -p /dev/sda1

  • tune2fs -C 0 /dev/sda1

  • tune2fs -i 0 /dev/sda1

  • tune2fs -c 1 /dev/sda1

Question 9 of 15

A system administrator needs to verify the active firewall rules on a Linux server to ensure compliance with the company's security policies. Which of the following commands provides the most comprehensive output of the currently active firewall rules?

  • iptables -L

  • iptables -S

  • iptables -L -v -n

  • iptables --state

Question 10 of 15

During the process of enhancing the security of your company's e-commerce platform, you are tasked to obtain a digital certificate for encrypting web traffic. Considering the critical nature of the data being protected, what aspect should be a top priority when choosing an entity to issue and manage the necessary digital certificates?

  • Past security incidents involving the entity

  • The overall trust and reliability of the issuing entity

  • Proximity of the entity's operations to your data center

  • The pricing model of the entity for certificate issuance

Question 11 of 15

A systems administrator notices that a user who is a member of the 'data-analysts' group cannot modify files in the 'analytics_reports' directory. The directory permissions are set to drwxrwx---. The user and group ownerships are 'datamgr' and 'data-analysts' respectively. The administrator has verified that the user is indeed a member of the 'data-analysts' group. What should the administrator investigate as the most likely cause of this issue?

  • The filesystem for the 'analytics_reports' directory is mounted as read-only

  • There is full disk space, preventing any changes to files

  • The user has not logged out and back in since being added to the group

  • There are file-specific ACLs that override group permissions and prevent modifications

Question 12 of 15

A system administrator is tasked with restricting access to a web server running on the default HTTP port to only the IP range 192.168.100.0/24. The server is currently using firewalld for its firewall management. Which of the following commands should the administrator use to accomplish this task?

  • firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.100.0/24" port protocol="tcp" port="80" accept'

  • firewall-cmd --permanent --zone=public --add-source=192.168.100.256/24

  • firewall-cmd --permanent --new-zone=192.168.100.0/24

  • firewall-cmd --permanent --zone=public --add-service=http --source=192.168.100.0/24

Question 13 of 15

A system administrator wants to generate a report of disk usage by each user in the home directory and store the output to a file called disk_report.txt, overwriting any existing data in the file. Which command should they use to accomplish this task?

  • du -h /home/* &> disk_report.txt

  • du -h /home/* > disk_report.txt

  • du -h /home/* >> disk_report.txt

  • du -h /home/* < disk_report.txt

Question 14 of 15

A security administrator is hardening a Linux server that should only allow encrypted web traffic over HTTPS. Which of the following firewall-cmd commands should the administrator execute to block unencrypted HTTP traffic on the standard port?

  • sudo firewall-cmd --permanent --remove-service=http

  • sudo firewall-cmd --permanent --add-port=80/tcp

  • sudo firewall-cmd --permanent --add-service=http

  • sudo firewall-cmd --permanent --list-services

Question 15 of 15

What is the role of the pipe character in a Linux command line operation?

  • To append the output of a command to the end of a file

  • To execute a command in the background

  • To redirect the output of one command to the input of another command

  • To overwrite the content of a file with the output of a command