Actual XK0-006 Exam Recently Updated Questions with Free Demo
Free CompTIA XK0-006 Exam Questions Self-Assess Preparation
NEW QUESTION # 51
To perform a live migration, which of the following must match on both host servers? (Choose two).
- A. Available swap
- B. Disk storage path
- C. Network speed
- D. CPU architecture
- E. Available memory
- F. USB ports
Answer: B,D
Explanation:
CPU architecture must match because live migration requires CPU compatibility to continue running the virtual machine without errors.
Disk storage path must match so the migrated VM can access its virtual disks seamlessly on the destination host.
NEW QUESTION # 52
An administrator must secure an account for a user who is going on extended leave. Which of the following steps should the administrator take? (Choose two).
- A. Delete the user's /homefolder.
- B. Set the user's files to immutable.
- C. Change the date on the /homefolder to that of the expected return date.
- D. Instruct the user to log in once per week.
- E. Change the user's shell to /sbin/nologin.
- F. Run the command passwd -l user.
Answer: E,F
Explanation:
passwd -l user locks the user's account by disabling the password, preventing logins.
Change the user's shell to /sbin/nologin ensures the account cannot be used for interactive logins, further securing it.
NEW QUESTION # 53
Which of the following commands should an administrator use to see a full hardware inventory of a Linux system?
- A. dmidecode
- B. lscpu
- C. lsmod
- D. dmesg
Answer: A
Explanation:
dmidecode retrieves detailed hardware information from the system's DMI/SMBIOS, including BIOS, CPU, memory, and motherboard details, providing a full hardware inventory.
NEW QUESTION # 54
A systems technician needs to install a third-party software package. Which of the following commands would allow the technician to download this software package from a remote server?
- A. nc
- B. wget
- C. telnet
- D. netstat
Answer: B
Explanation:
wget is specifically designed to download files from remote servers using HTTP, HTTPS, or FTP protocols, making it the appropriate command for retrieving software packages.
NEW QUESTION # 55
A Linux administrator needs to securely erase the contents of a hard disk. Which of the following commands is the best for this task?
- A. sudo rm -rf /dev/sda1
- B. sudo dd if=/dev/null of=/dev/sda1
- C. sudo parted rm /dev/sda1
- D. sudo shred /dev/sda1
Answer: D
Explanation:
The shred command securely erases data by overwriting the specified device or file multiple times, making recovery nearly impossible. This is the best option for securely erasing a hard disk.
NEW QUESTION # 56
An administrator completes maintenance on a server but cannot remount the logical volume.
Given the following output:
Which of the following commands should the administrator execute to resolve the issue?
- A. vgchange -ay data
- B. vgimport data
- C. lvchange -ay /dev/data/files
- D. lvscan --all
Answer: A
Explanation:
The error message "special device /dev/data/files does not exist" suggests that the volume group data is not activated. From the lvsand vgsoutput:
- The logical volume files exists within the data volume group.
- The volume group (VG) and logical volume (LV) appear correctly listed, but they might be in an inactive state due to maintenance.
NEW QUESTION # 57
A systems administrator is deploying a web server using the following code:
Which of the following technologies is the administrator using to create this web server?
- A. Terraform
- B. Ansible
- C. Puppet
- D. Chef
Answer: D
Explanation:
The code uses Chef's Ruby DSL for defining a role with name, description, run_list, and default_attributes, which are constructs specific to Chef.
NEW QUESTION # 58
A Linux systems administrator is running an important maintenance task that consumes a large amount of CPU, causing other applications to slow. Which of the following actions should the administrator take to help alleviate the issue?
- A. Execute the other applications with the bgutility.
- B. Run the maintenance task with nohup.
- C. Increase the available CPU time with pidstat.
- D. Lower the priority of the maintenance task with renice.
Answer: D
Explanation:
The renice command adjusts the priority of a running process. By lowering the maintenance task's priority, the scheduler allocates more CPU time to other applications, reducing their slowdown.
NEW QUESTION # 59
A systems administrator is creating a backup copy of the /home/directory. Which of the following commands allows the administrator to archive and compress the directory at the same time?
- A. cpio -o /backups/home.tar.xz /home/
- B. dd of=/backups/home.tar.xz if=/home/
- C. rsync -z /backups/home.tar.xz /home/
- D. tar -cJf /backups/home.tar.xz /home/
Answer: D
Explanation:
The tar -cJf command creates (-c) an archive, compresses it with XZ (-J), and writes it to a file (- f). This allows archiving and compression of the /home/ directory in one step.
NEW QUESTION # 60
A systems administrator needs to check the statuses of all the services on a Linux server. Which of the following commands accomplishes this task?
- A. systemctl list-units --type-services
- B. systemctl list-sockets --type-services
- C. systemctl is-enabled --services
- D. systemctl is-active --services
Answer: A
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.
NEW QUESTION # 61
A systems administrator wants to check if the ntpd service is configured to start on startup. Which of the following commands will show that information when run?
- A. systemctl is-enabled ntpd.service
- B. systemctl is-active ntpd.service
- C. systemctl stop ntpd.service
- D. systemctl start ntpd.service
Answer: A
NEW QUESTION # 62
A Linux administrator just finished setting up passwordless SSH authentication between two nodes. However, upon test validation, the remote host prompts for a password. Given the following logs:
Which of the following is the most likely cause of the issue?
- A. The authorized_keysfile has the incorrect root permissions assigned.
- B. The authorized_keysfile does not have the correct security context to match SELinux policy.
- C. The SELinux policy is incorrectly targeting the unconfined_ucontext.
- D. The administrator forgot to restart the SSHD after creating the authorized_keysfile.
Answer: B
Explanation:
The log shows avc: denied { read } caused by SELinux when sshd tries to access authorized_keys. The file has the wrong SELinux context (unconfined_u:object_r:home_root_t) instead of the expected context for SSH. This mismatch blocks SSH key authentication even though file permissions are correct. Adjusting the SELinux context (e.g., with restorecon) resolves the issue.
NEW QUESTION # 63
A DevOps engineer made some changes to files on a local repository. The engineer realizes that the changes broke the application and the changes need to be reverted back. Which of the following commands is the best way to accomplish this task?
- A. git pull
- B. git rebase
- C. git stash
- D. git reset
Answer: D
Explanation:
The git reset command reverts changes in the local repository to a previous commit, effectively discarding the problematic modifications and restoring the application to a working state.
NEW QUESTION # 64
A Linux administrator wants to add a user to the Docker group without changing their primary group. Which of the following commands should the administrator use to complete this task?
- A. sudo usermod -aG docker user
- B. sudo usermod -g docker user
- C. sudo groupmod -G docker user
- D. sudo groupmod docker user
Answer: A
Explanation:
The usermod -aG command appends (-a) the user to a supplementary group (-G) without changing their primary group. This is the correct way to add a user to the docker group.
NEW QUESTION # 65
A systems administrator wants to prevent the current contents of a file from being overwritten and wants to allow new additions at the end of the file. Which of the following commands should the administrator use?
- A. chattr +a file
- B. setfacl -m m::t file
- C. chmod +t file
- D. setenforce file
Answer: A
Explanation:
The chattr +a command sets the append-only attribute on a file. This prevents overwriting or deletion of existing contents, while still allowing new data to be appended to the end of the file.
NEW QUESTION # 66
A systems administrator is working on an SFTP server configuration. Which of the following commands will best enable the connectivity to that service from the 10.10.0.0/24 network?
- A. sudo ufw allow 0:22/tcp from 10.10.0.0
- B. sudo ufw allow in on eth0 to any port 22
- C. sudo ufw allow from 10.10.0.0/24
- D. sudo ufw allow from 10.10.0.0/24 to any port 22
Answer: D
Explanation:
The command sudo ufw allow from 10.10.0.0/24to any port 22 explicitly opens TCP port 22 (used by SFTP/SSH) only for hosts in the 10.10.0.0/24 network.
NEW QUESTION # 67
A systems administrator needs to write a script that counts the number of times "FAIL" appears in a log file. If "FAIL" appears zero times, then the administrator would like to print the message
"SUCCESS." Given the following:
Which of the following should be used before the zero to complete the script?
- A. -gt
- B. -ne
- C. -eq
- D. -lt
Answer: C
Explanation:
The test should check if the count of "FAIL" equals zero. The operator -eq is used for numeric equality in shell conditionals, so [ $(grep -c FAIL /var/file.log) -eq 0 ] correctly evaluates whether the count is zero.
NEW QUESTION # 68
......
XK0-006 Free Sample Questions to Practice One Year Update: https://www.exam4labs.com/XK0-006-practice-torrent.html
Download XK0-006 exam with CompTIA XK0-006 Real Exam Questions: https://drive.google.com/open?id=1QzpLkYwYSr279tqoKHqCxYWChMBVsfJk