Free XK0-006 practice questions: 20 with answers
Twenty questions across the five XK0-006 domains, weighted close to the published percentages: five on System Management, four on Services and User Management, three on Security, three on Automation, Orchestration, and Scripting and five on Troubleshooting. These are original scenario questions written at objective level, and none is taken from the real exam. They are multiple-choice only; the real exam also has performance-based questions, so practise the commands in a terminal too. Aim for 16 or more correct. The study plan shows how to turn missed questions into review time.
System Management
Question 1. An administrator adds a new disk and wants to use it to expand an existing volume group. Which command adds the disk, after it has been prepared as a physical volume, to the group?
- A. lvcreate
- B. pvremove
- C. vgextend
- D. mkfs.xfs
Show answer
Answer: C
vgextend adds a physical volume to an existing volume group. lvcreate makes a logical volume, pvremove deletes physical volume metadata and mkfs.xfs formats a filesystem.
Want more questions like this? Full XK0-006 practice tests →
Question 2. A server drops into emergency mode after a reboot because of a bad line in /etc/fstab for a non-essential data disk. Which option on that line would have let the boot continue?
- A. nofail
- B. noatime
- C. noexec
- D. remount
Show answer
Answer: A
nofail lets the boot continue when the device cannot be mounted. noatime stops access-time updates, noexec blocks execution and remount is used to change options on a mounted filesystem.
Want more questions like this? Full XK0-006 practice tests →
Question 3. Which command shows detailed information about a loaded kernel module, such as its parameters and description?
- A. lsmod
- B. rmmod
- C. depmod
- D. modinfo
Show answer
Answer: D
modinfo displays module details. lsmod lists loaded modules, rmmod removes one and depmod rebuilds dependency information.
Want more questions like this? Full XK0-006 practice tests →
Question 4. A one-liner must print the third field of each line in a colon-separated file. Which command does this?
- A. sort -t: -r file
- B. cut -d: -f3 file
- C. wc -l file
- D. tr : 3 file
Show answer
Answer: B
cut with -d: as the delimiter and -f3 selects the third field. sort reorders lines, wc counts them and tr translates characters rather than selecting fields.
Want more questions like this? Full XK0-006 practice tests →
Question 5. An administrator wants to copy only changed files from /srv/data to a remote backup host over SSH, preserving permissions. Which tool fits best?
- A. rsync -a
- B. dd
- C. cpio -o with no options
- D. zcat
Show answer
Answer: A
rsync transfers only differences and -a preserves permissions and other attributes. dd copies raw blocks, cpio alone does not do incremental network sync and zcat reads compressed files.
Want more questions like this? Full XK0-006 practice tests →
Services and User Management
Question 6. A script must run every weekday at 02:30. Which scheduler entry type is designed for recurring jobs like this?
- A. at
- B. cron
- C. nohup
- D. renice
Show answer
Answer: B
cron, through crontab, schedules recurring jobs. at runs a job once, nohup keeps a process running after logout and renice changes priority.
Want more questions like this? Full XK0-006 practice tests →
Question 7. Which command creates a symbolic link named /opt/app pointing to /srv/app-v2?
- A. ln /srv/app-v2 /opt/app
- B. ln -h /opt/app /srv/app-v2
- C. ln -s /srv/app-v2 /opt/app
- D. link /opt/app
Show answer
Answer: C
ln -s target linkname creates a symbolic link. Without -s ln creates a hard link, and reversing the arguments makes the link in the wrong place.
Want more questions like this? Full XK0-006 practice tests →
Question 8. A service should start automatically at boot and also be started right now. Which command does both with a single command?
- A. systemctl mask –now
- B. systemctl reload –now
- C. systemctl daemon-reload –now
- D. systemctl enable –now
Show answer
Answer: D
enable –now enables the unit for boot and starts it immediately. mask blocks a unit, reload asks a running service to reread its configuration and daemon-reload rereads unit files.
Want more questions like this? Full XK0-006 practice tests →
Question 9. A container must keep its database files after it is deleted. What should be used?
- A. A mapped volume
- B. The container’s writable layer only
- C. A tag on the image
- D. The –rm flag
Show answer
Answer: A
A volume stores data outside the container’s writable layer, so it survives deletion. The writable layer disappears with the container, tags label images and –rm removes the container when it exits.
Want more questions like this? Full XK0-006 practice tests →
Security
Question 10. An administrator needs to give one user read access to a file owned by another user and group without changing ownership or group membership. Which tool is most suitable?
- A. chattr +i
- B. setfacl
- C. umask
- D. chroot
Show answer
Answer: B
setfacl sets an access control list entry for a specific user. chattr +i makes a file immutable, umask sets default modes for new files and chroot changes the apparent root directory.
Want more questions like this? Full XK0-006 practice tests →
Question 11. Which disk encryption format encrypts a block device on Linux and is managed with the cryptsetup command?
- A. HMAC
- B. WireGuard
- C. LUKS2
- D. AIDE
Show answer
Answer: C
LUKS2 is the Linux disk encryption format used with cryptsetup. HMAC is a message authentication method, WireGuard is a VPN and AIDE checks file integrity.
Want more questions like this? Full XK0-006 practice tests →
Question 12. A server must accept inbound HTTPS and drop everything else new. Which ufw approach matches the requirement?
- A. Allow all traffic and deny 443
- B. Disable the firewall and use sudo
- C. Deny 443 and allow all other incoming
- D. Default deny incoming and allow 443/tcp
Show answer
Answer: D
A default-deny policy with an explicit allow for TCP 443 permits only HTTPS inbound. The other options either open everything or block the required port.
Want more questions like this? Full XK0-006 practice tests →
Automation, Orchestration, and Scripting
Question 13. A playbook run reports that it cannot reach the target hosts. Which Ansible element lists the managed hosts?
- A. The inventory
- B. A handler
- C. A fact
- D. A collection
Show answer
Answer: A
The inventory defines the hosts and groups that Ansible manages. Handlers react to changes, facts are collected data and collections are packaged content.
Want more questions like this? Full XK0-006 practice tests →
Question 14. Which Git command downloads remote changes without merging them into the current branch?
- A. git pull
- B. git fetch
- C. git merge
- D. git stash
Show answer
Answer: B
git fetch updates remote-tracking references without changing the working branch. git pull fetches and merges, merge combines branches and stash shelves local changes.
Want more questions like this? Full XK0-006 practice tests →
Question 15. A Python project needs its own set of installed packages without affecting system packages. What should be created first?
- A. A cron job
- B. A Kickstart file
- C. A virtual environment
- D. A systemd timer
Show answer
Answer: C
A virtual environment isolates a project’s dependencies from the system. The other options handle scheduling or installation automation, not Python package isolation.
Want more questions like this? Full XK0-006 practice tests →
Troubleshooting
Question 16. After a reboot, a system shows a GRUB prompt instead of starting Linux. Which problem category is most likely?
- A. SELinux boolean error
- B. Bootloader misconfiguration
- C. DNS failure
- D. Expired user password
Show answer
Answer: B
A GRUB prompt means the bootloader could not find or load its configuration or kernel. SELinux, DNS and password expiry occur after the kernel has loaded.
Want more questions like this? Full XK0-006 practice tests →
Question 17. A server is slow and top shows many processes in uninterruptible sleep while the CPU is mostly idle. Which cause is most likely?
- A. A zombie process
- B. A syntax error in a script
- C. A bad MTU
- D. Storage or I/O waits
Show answer
Answer: D
Processes blocked in uninterruptible sleep with idle CPU typically wait on I/O. Zombies use no CPU but are not the cause of widespread blocking, and script syntax and MTU do not match the symptom.
Want more questions like this? Full XK0-006 practice tests →
Question 18. A client reaches a server by IP address on port 22 but a name lookup for the server fails. Which command best tests DNS directly?
- A. dig
- B. fsck
- C. chage
- D. mdadm
Show answer
Answer: A
dig queries DNS servers directly. fsck checks filesystems, chage manages password ageing and mdadm manages RAID.
Want more questions like this? Full XK0-006 practice tests →
Question 19. A web service cannot read files in its document root even though ownership and mode are correct and SELinux is enforcing. Which command reveals the file's security context?
- A. getfacl -d
- B. lsattr
- C. ls -Z
- D. umask
Show answer
Answer: C
ls -Z shows SELinux contexts, which are the likely cause here. getfacl shows ACLs, lsattr shows attributes and umask shows default permissions for new files.
Want more questions like this? Full XK0-006 practice tests →
Question 20. The root filesystem is full. Which command shows which top-level directories use the most space?
- A. lsblk -f
- B. du -sh /* 2>/dev/null
- C. blkid
- D. df -i
Show answer
Answer: B
du -sh summarises directory sizes, which helps find what fills the disk. lsblk and blkid list devices, and df -i reports inode usage rather than directory sizes.
Want more questions like this? Full XK0-006 practice tests →
What next
Count your misses by domain and revisit those pages, starting with system management or troubleshooting. The cheat sheet works for a last review.