Study HIGH Quality XK0-005 Free Study Guides and Exams Tutorials
Download CompTIA XK0-005 Exam Dumps to Pass Exam Easily
CompTIA Linux+ certification exam is an excellent way for IT professionals to demonstrate their expertise in Linux-based systems. Passing the XK0-005 exam will not only validate your knowledge and skills but also enhance your credibility in the IT industry. It is a challenging yet rewarding certification that can open up many career opportunities for IT professionals.
NEW QUESTION # 75
A systems administrator configured firewall rules using firewalld. However, after the system is rebooted, the firewall rules are not present:
The systems administrator makes additional checks:
Which of the following is the reason the firewall rules are not active?
- A. FIREWALL_ARGS has no value assigned.
- B. The firewalld service is not enabled.
- C. The wrong system target is activated.
- D. iptables is conflicting with firewalld.
Answer: B
Explanation:
Explanation
The reason the firewall rules are not active is that the firewalld service is not enabled. This means that the service will not start automatically at boot time or after a system reload. To enable the firewalld service, the systems administrator needs to use the command sudo systemctl enable firewalld. This will create a symbolic link from the firewalld service file to the appropriate systemd target, such as multi-user.target. Enabling the service does not start it immediately, so the systems administrator also needs to use the command sudo systemctl start firewalld or sudo systemctl reload firewalld to activate the firewall rules.
The other options are not correct reasons for the firewall rules not being active. iptables is not conflicting with firewalld, because firewalld uses iptables as its backend by default. The wrong system target is not activated, because firewalld is independent of the system target and can be enabled for any target. FIREWALL_ARGS has no value assigned, but this is not a problem, because FIREWALL_ARGS is an optional environment variable that can be used to pass additional arguments to the firewalld daemon, such as --debug or --nofork. If FIREWALL_ARGS is empty or not defined, firewalld will use its default arguments. References: firewalld.service(8) - Linux manual page; firewall-cmd(1) - Linux manual page; systemctl(1) - Linux manual page
NEW QUESTION # 76
A systems administrator received a notification that a system is performing slowly. When running the top command, the systems administrator can see the following values:
Which of the following commands will the administrator most likely run NEXT?
- A. vmstat
- B. lsof
- C. strace
- D. htop
Answer: A
NEW QUESTION # 77
An administrator recently updated the BIND software package and would like to review the default configuration that shipped with this version. Which of the following files should the administrator review?
- A. /etc/bind/bind.conf
- B. /etc/named.conf.rpmsave
- C. /etc/named.conf.rpmnew
- D. /etc/named.conf
Answer: C
Explanation:
Explanation
After installing a new version of a package that includes a configuration file that already exists on the system, such as /etc/httpd/conf/httpd.conf, RPM will create a new file with the .rpmnew extension instead of overwriting the existing file. This allows the administrator to review the default configuration that shipped with this version and compare it with the current configuration before deciding whether to merge or replace the files. The /etc/named.conf.rpmsave file is created by RPM when a package is uninstalled and it contains a configuration file that was modified by the administrator. This allows the administrator to restore the configuration file if needed. The /etc/named.conf file is the main configuration file for the BIND name server, not the httpd web server. The /etc/bind/bind.conf file does not exist by default in Linux systems. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 19: Managing Packages and Software, page 561.
NEW QUESTION # 78
A systems administrator is investigating why one of the servers has stopped connecting to the internet.
Which of the following is causing the issue?
- A. The DNS address has been commented out in the configuration file.
- B. Wired connection 1 is offline.
- C. The search entry in the /etc/resolv.conf file is incorrect.
- D. No default route is defined.
Answer: D
Explanation:
Explanation
The issue is caused by the lack of a default route defined in the /etc/sysconfig/network-scripts/ifcfg-enp0s3 file. A default route is a special route that specifies where to send packets that do not match any other routes in the routing table. Without a default route, the server will not be able to communicate with hosts outside its local network. The default route is usually configured with the GATEWAY option in the network interface configuration file. For example, to set the default gateway to 192.168.1.1, the file should contain:
GATEWAY=192.168.1.1
The other options are not causing the issue. The DNS address is not commented out in the configuration file, it is specified with the DNS1 option. The search entry in the /etc/resolv.conf file is correct, it specifies the domain name to append to unqualified hostnames. Wired connection 1 is online, as indicated by the ONBOOT=yes option and the output of ip link show enp0s3 command. References: Configuring IP Networking with nmcli; Configuring IP Networking with ifcfg Files
NEW QUESTION # 79
A Linux administrator was tasked with deleting all files and directories with names that are contained in the sobelete.txt file. Which of the following commands will accomplish this task?
- A. cat toDelete.txt | rm -frd
- B. xargs -f cat toDelete.txt -rm
- C. cat toDelete.txt | xargs rm -rf
- D. rm -d -r -f toDelete.txt
Answer: D
NEW QUESTION # 80
A systems administrator pressed Ctrl+Z after starting a program using the command line, and the shell prompt was presented. In order to go back to the program, which of the following commands can the administrator use?
- A. su
- B. fg
- C. bg
- D. ed
Answer: B
NEW QUESTION # 81
A Linux systems administrator is configuring a new filesystem that needs the capability to be mounted persistently across reboots. Which of the following commands will accomplish this task? (Choose two.)
- A. df -h /data
- B. mkfs.ext4 /dev/sdc1
- C. echo "/data /dev/sdc1 ext4 defaults 0 0" >> /etc/fstab
- D. fsck /dev/sdc1
- E. echo "/dev/sdc1 /data ext4 defaults 0 0" >> /etc/fstab
- F. fdisk -l /dev/sdc1
Answer: B,E
Explanation:
"modify the /etc/fstab text file to automatically mount the new partition by opening it in an editor and adding the following line:
/dev/ xxx 1 /data ext4 defaults 1 2
where xxx is the device name of the storage device"
https://learning.oreilly.com/library/view/mastering-linux-system/9781119794455/b01.xhtml
NEW QUESTION # 82
A Linux administrator is tasked with adding users to the system. However, the administrator wants to ensure the users' access will be disabled once the project is over. The expiration date should be 2021-09-30. Which of the following commands will accomplish this task?
- A. sudo modinfo -F 2021-09-30 Project_uses
- B. sudo useradd -m -d 2021-09-30 Project_user
- C. sudo useradd -e 2021-09-30 Project_user
- D. sudo useradd -c 2021-09-30 Project_user
Answer: C
Explanation:
The command that will accomplish this task is sudo useradd -e 2021-09-30 Project_user. This command will create a new user account named Project_user with an expiration date of 2021-09-30. The -e option of useradd specifies the date on which the user account will be disabled in YYYY-MM-DD format.
The other options are not correct commands for creating a user account with an expiration date. The sudo useradd -c 2021-09-30 Project_user command will create a new user account named Project_user with a comment of 2021-09-30. The -c option of useradd specifies a comment or description for the user account, not an expiration date. The sudo modinfo -F 2021-09-30 Project_user command is invalid because modinfo is not a command for managing user accounts, but a command for displaying information about kernel modules. The -F option of modinfo specifies a field name to show, not an expiration date. The sudo useradd -m -d 2021-09-30 Project_user command will create a new user account named Project_user with a home directory of 2021-09-30. The -m option of useradd specifies that the home directory should be created if it does not exist, and the -d option specifies the home directory name, not an expiration date. Reference: useradd(8) - Linux manual page; modinfo(8) - Linux manual page
NEW QUESTION # 83
A development team asks an engineer to guarantee the persistency of journal log files across system reboots. Which of the following commands would accomplish this task?
- A. sed -i 's/auto/persistent/g' /etc/systemd/journald.conf && sed -i 'persistent/s/'#//q' /etc/systemd/journald.conf
- B. journalctl --list-boots && systemctl restart systemd-journald.service
- C. grep -i auto /etc/systemd/journald.conf && systemctl restart systemd-journald.service
- D. cat /etc/systemd/journald.conf | awk '(print $1,$3)'
Answer: A
Explanation:
The command sed -i 's/auto/persistent/g' /etc/systemd/journald.conf && sed -i 'persistent/s/'#//q' /etc/systemd/journald.conf will accomplish the task of guaranteeing the persistency of journal log files across system reboots. The sed command is a tool for editing text files on Linux systems. The -i option modifies the file in place. The s command substitutes one string for another. The g flag replaces all occurrences of the string. The && operator executes the second command only if the first command succeeds. The q command quits after the first match. The /etc/systemd/journald.conf file is a configuration file for the systemd-journald service, which is responsible for collecting and storing log messages. The command sed -i 's/auto/persistent/g' /etc/systemd/journald.conf will replace the word auto with the word persistent in the file. This will change the value of the Storage option, which controls where the journal log files are stored. The value auto means that the journal log files are stored in the volatile memory and are lost after reboot, while the value persistent means that the journal log files are stored in the persistent storage and are preserved across reboots. The command sed -i 'persistent/s/'#//q' /etc/systemd/journald.conf will remove the # character at the beginning of the line that contains the word persistent. This will uncomment the Storage option and enable it. The command sed -i 's/auto/persistent/g' /etc/systemd/journald.conf && sed -i 'persistent/s/'#//q' /etc/systemd/journald.conf will guarantee the persistency of journal log files across system reboots by changing and enabling the Storage option to persistent. This is the correct command to use to accomplish the task. The other options are incorrect because they either do not change the value of the Storage option (grep -i auto /etc/systemd/journald.conf && systemctl restart systemd-journald.service or cat /etc/systemd/journald.conf | awk '(print $1,$3)') or do not enable the Storage option (journalctl --list-boots && systemctl restart systemd-journald.service). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 16: Managing Logging and Monitoring, page 489.
NEW QUESTION # 84
A Linux engineer is setting the sticky bit on a directory called devops with 755 file permission. Which of the following commands will accomplish this task?
- A. chown -s 755 devops
- B. chmod -s 755 devops
- C. chown 1755 devops
- D. chmod 1755 devops
Answer: D
Explanation:
Explanation
The command that will set the sticky bit on a directory called devops with 755 file permission is chmod 1755 devops. This command will use chmod to change the mode of the directory devops to 1755, which means that the owner has read, write, and execute permissions (7), the group has read and execute permissions (5), and others have read and execute permissions (5). The first digit 1 indicates that the sticky bit is set on the directory, which is a special permission that prevents users from deleting or renaming files in the directory that they do not own.
The other options are not correct commands for setting the sticky bit on a directory. The chown -s 755 devops command is invalid because chown is used to change the owner and group of files or directories, not their permissions. The -s option for chown is used to remove a symbolic link, not to set the sticky bit. The chown
1755 devops command is also invalid because chown does not accept numeric arguments for changing permissions. The chmod -s 755 devops command will remove the sticky bit from the directory devops, not set it. References: chmod(1) - Linux manual page; How to Use SUID, SGID, and Sticky Bits on Linux
NEW QUESTION # 85
A Linux engineer needs to create a custom script, cleanup.sh, to run at boot as part of the system services. Which of the following processes would accomplish this task?
- A. Create a unit file in the /etc/ske1/ directory.
systemctl enable cleanup
systemctl is-enabled cleanup - B. Create a unit file in the /etc/default/ directory.
systemctl enable cleanup
systemctl is-enabled cleanup - C. Create a unit file in the /etc/systemd/system/ directory.
systemctl enable cleanup
systemctl is-enabled cleanup - D. Create a unit file in the /etc/sysctl.d/ directory.
systemctl enable cleanup
systemctl is-enabled cleanup
Answer: C
NEW QUESTION # 86
A Linux administrator needs to connect securely to a remote server in order to install application software. Which of the following commands would allow this connection?
- A. telnet 10.0.0.1 80
- B. sftp "ABC-key.pem" [email protected]
- C. ssh -i "ABC-key.pem" [email protected]
- D. sftp rooteiO.0.0.1
- E. scp "ABC-key.pem" [email protected]
Answer: C
NEW QUESTION # 87
A Linux administrator is tasked with creating resources using containerization. When deciding how to create this type of deployment, the administrator identifies some key features, including portability, high availability, and scalability in production. Which of the following should the Linux administrator choose for the new design?
- A. On-premises systems
- B. Cloud-based systems
- C. Kubernetes
- D. Docker
Answer: C
Explanation:
Explanation
The Linux administrator should choose Kubernetes for the new design that requires portability, high availability, and scalability in production using containerization. Kubernetes is an open-source platform that automates the deployment, scaling, and management of containerized applications across clusters of nodes.
Kubernetes provides features such as service discovery, load balancing, storage orchestration, self-healing, secret and configuration management, and batch execution. Kubernetes also supports multiple container runtimes, such as Docker, containerd, and CRI-O, making it portable across different platforms and clouds. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Automating Tasks; What is Kubernetes? | Kubernetes
NEW QUESTION # 88
A systems administrator needs to reconfigure a Linux server to allow persistent IPv4 packet forwarding. Which of the following commands is the correct way to accomplish this task?
- A. echo 1 > /proc/sys/net/ipv4/ipv_forward
- B. firewall-cmd --enable ipv4_forwarding
- C. systemctl start ipv4_forwarding
- D. sysctl -w net.ipv4.ip_forward=1
Answer: D
NEW QUESTION # 89
A Linux administrator cloned an existing Linux server and built a new server from that clone. The administrator encountered the following error after booting the cloned server:
The administrator performed the commands listed below to further troubleshoot and mount the missing filesystem:
Which of the following should administrator use to resolve the device mismatch issue and mount the disk?
- A. fsck -A
- B. mount disk by-blkid
- C. mount disk by-label
- D. mount disk by device-id
Answer: D
Explanation:
The administrator should use the command mount disk by device-id to resolve the device mismatch issue and mount the disk. The issue is caused by the cloned server having a different device name for the disk than the original server. The output of blkid shows that the disk has the device name /dev/sdb1 on the cloned server, but the output of cat /etc/fstab shows that the disk is expected to have the device name /dev/sda1. The command mount disk by device-id will mount the disk by using its unique identifier (UUID) instead of its device name. The UUID can be obtained from the output of blkid or lsblk -f. The command will mount the disk to the specified mount point (/data) and resolve the issue. The other options are incorrect because they either do not mount the disk (fsck -A), do not use the correct identifier (mount disk by-label or mount disk by-blkid), or do not exist (mount disk by-blkid). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 10: Managing Storage, pages 318-319.
NEW QUESTION # 90
A Linux administrator needs to ensure that Java 7 and Java 8 are both locally available for developers to use when deploying containers. Currently only Java 8 is available. Which of the following commands should the administrator run to ensure both versions are available?
- A. docker image load java:7
- B. docker image pull java:7
- C. docker image build java:7
- D. docker image import java:7
Answer: B
NEW QUESTION # 91
......
CompTIA Linux+ certification exam comprises of 90 multiple-choice and performance-based questions. XK0-005 exam is designed to test the candidate's knowledge and skills in various areas of Linux-based systems. XK0-005 exam is available in English, Japanese, and Portuguese, and candidates are given 90 minutes to complete it. To pass the exam, candidates must score a minimum of 720 out of 900.
Get 100% Real Free Linux+ XK0-005 Sample Questions: https://www.exams4collection.com/XK0-005-latest-braindumps.html
Accurate XK0-005 Questions with Free and Fast Updates: https://drive.google.com/open?id=15jpy3yY5Oxy_5JuS1BrqRPhv_lwIHbkx
