0 likes | 0 Views
Prepare effectively for the CompTIA Linux (XK0-005) exam with a comprehensive PDF featuring real exam questions and verified answers, designed to enhance your Linux knowledge and exam confidence.<br><br>
E N D
CompTIA XK0-005 Exam CompTIA Linux+ Exam Exam Latest Version: 20.6 DEMO Version Full Version Features: • 90 Days Free Updates • 30 Days Money Back Guarantee • Instant Download Once Purchased • 24 Hours Live Chat Support Full version is available at link below with affordable price. https://www.directcertify.com/comptia/xk0-005 https://www.directcertify.com/comptia/xk0-005 Page 1 of 7
Question 1. (Single Select) An administrator accidentally deleted the /boot/vmlinuz file and must resolve the issue before the server is rebooted. Which of the following commands should the administrator use to identify the correct A: rpm -qa | grep kernel; uname -a B: yum -y update; shutdown -r now C: cat /etc/centos-release; rpm -Uvh --nodeps D: telinit 1; restorecon -Rv /boot Correct Answer: A Explanation: The command rpm -qa | grep kernel lists all the installed kernel packages, and the command uname -a displays the current kernel version. These commands can help the administrator identify the correct version of the /boot/vmlinuz file, which is the kernel image file. The other options are not relevant or helpful for this task. CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 8: Managing the Linux Boot Process, page 267. Question 2. (DRAGDROP) As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following: Add relevant content to /tmp/script.sh, so that it finds and compresses rotated files in /var/log without recursion. INSTRUCTIONS Fill the blanks to build a script that performs the actual compression of rotated log files. If at any time you would like to bring back the initial state of the simulation, please click the Reset All button. https://www.directcertify.com/comptia/xk0-005 Page 2 of 7
Correct Answer: Question 3. (HOTSPOT) A new drive was recently added to a Linux system. Using the environment and tokens provided, complete the following tasks: • Create an appropriate device label. https://www.directcertify.com/comptia/xk0-005 Page 3 of 7
• Format and create an ext4 file system on the new partition. The current working directory is /. Correct Answer: Question 4. (Multi Select) A new Linux systems administrator just generated a pair of SSH keys that should allow connection to the servers. Which of the following commands can be used to copy a key file to remote servers? (Choose two.) https://www.directcertify.com/comptia/xk0-005 Page 4 of 7
A: wget B: ssh-keygen C: ssh-keyscan D: ssh-copy-id E: ftpd F: scp Correct Answer: D, F Explanation: The commands ssh-copy-id and scp can be used to copy a key file to remote servers. The command ssh-copy-id copies the public key to the authorized_keys file on the remote server, which allows the user to log in without a password. The command scp copies files securely over SSH, which can be used to transfer the key file to any location on the remote server. The other options are incorrect because they are not related to copying key files. The command wget downloads files from the web, the command ssh-keygen generates key pairs, the command ssh-keyscan collects public keys from remote hosts, and the command ftpd is a FTP server daemon. CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, pages 408-410. Question 5. (Single Select) A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Given the following: https://www.directcertify.com/comptia/xk0-005 Page 5 of 7
Which of the following commands should replace the <CONDITIONAL> string? A: if [ -f "$filename" ]; then B: if [ -d "$filename" ]; then C: if [ -f "$filename" ] then D: if [ -f "$filename" ]; while Correct Answer: A Explanation: The command if [ -f "$filename" ]; then checks if the variable $filename refers to a regular file that exists. The -f option is used to test for files. If the condition is true, the commands after then are executed. This is the correct way to replace the <CONDITIONAL> string. The other options are incorrect because they either use the wrong option (-d tests for directories), the wrong syntax (missing a semicolon after the condition), or the wrong keyword (while is used for loops, not conditions). CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 16: Writing and Executing Bash Shell Scripts, page 493. https://www.directcertify.com/comptia/xk0-005 Page 6 of 7
Full version is available at link below with affordable price. https://www.directcertify.com/comptia/xk0-005 30% Discount Coupon Code: LimitedTime2025 https://www.directcertify.com/comptia/xk0-005 Page 7 of 7