Latest XK0-005 Exam Dumps CompTIA Exam from Training Expert Actualtests4sure
Pass CompTIA CompTIA Linux+ Certification Exam PDF Dumps | Recently Updated 895 Questions
NEW QUESTION # 357
Joe, a user, is unable to log in to the server and contracts the systems administrator to look into the issue. The administrator examines the /etc/passwd file and discovers the following entry:
joe:x:505:505::/home/joe:/bin/false
Which of the following commands should the administrator execute to resolve the problem?
- A. passwd -u joe
- B. usermod -s /bin/bash joe
- C. chage -E -1 joe
- D. useradd -s /bin/bash joe
Answer: B
Explanation:
The clue here is "/bin/false" this will disable the user, what you need to do here is change
/'bin/false, to' /'bin/bash". You can do this by typing "chsh -s /bin/bash username" or "usermod -s
/bin/bash username"
NEW QUESTION # 358
A Linux administrator receives a ticket stating that end users are unable to access the company's internal cloud server. The administrator executes the following command:
bash
ping usl.com
Result:
ping: cannot resolve usl.com: Unknown Host
Which of the following files needs to be modified to allow end users to access usl.com?
- A. /etc/hostname
- B. /etc/interfaces
- C. /etc/hosts.allow
- D. /etc/resolv.conf
Answer: D
Explanation:
The error "cannot resolve host" indicates aDNS resolution failure. The file /etc/resolv.conf defines theDNS server(s)to be used for name resolution.
* /etc/interfaces configures network interfaces.
* /etc/hosts.allow is for TCP wrappers access control, not DNS.
* /etc/hostname defines thelocalsystem's hostname, not DNS configuration.
Reference:CompTIA Linux+ XK0-005 Study Guide, Domain 2.1 - Networking Fundamentals
"DNS resolution failures often stem from misconfigured or missing entries in /etc/resolv.conf."
NEW QUESTION # 359
A Linux administrator needs to expose port 9000 for a container to listen during runtime. The Linux administrator creates a Dockerfile with the following entries:
sql
FROM node:9-alpine
WORKDIR /usr/src/app
COPY package.json ./
RUN npm install
COPY . .
EXPOSE 9000
CMD ["npm", "start"]
Which of the following commands should the administrator use to accomplish this task? (Select two).
- A. docker inspect Test-Container
- B. docker tag Test-Container
- C. docker build -t Test-Container
- D. docker push Test-Container
- E. docker run -p 80:9000 Test-Container
- F. docker run -p 5000:80 Test-Container
Answer: C,E
Explanation:
First, the administrator should build the container image using the command docker build -t Test-Container, which creates a Docker image with the specified configuration. To run the container and expose port 9000, the correct command is docker run -p 80:9000 Test-Container, which maps the container's port 9000 to port 80 on the host machine, making the service accessible externally on port 80.
NEW QUESTION # 360
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. mount disk by-label
- B. mount disk by-blkid
- C. fsck -A
- D. mount disk by device-id
Answer: D
Explanation:
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). References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 10: Managing Storage, pages 318-319.
NEW QUESTION # 361
A system administrator has set up third-party log aggregation agents across several cloud instances. The systems administrator wants to create a dashboard of failed SSH attempts and the usernames used.
Which of the following files should be watched by the agents?
- A. /etc/rsyslog.conf
- B. /var/log/monitor
- C. /var/log/kern.log
- D. /var/log/audit/audit.log
Answer: D
Explanation:
https://access.redhat.com/documentation/en-
us/red_hat_enterprise_linux/6/html/security_guide/sec-understanding_audit_log_files
NEW QUESTION # 362
An organization's business office needs to collaborate on quarterly reports and asks the systems administrator to create a finance group. The administrator creates the following directory:
drwxrwxr-x Business Business 4096 Oct 15 16:40 Q1
Which of the following commands will allow all members of the finance group to have group ownership of all files created in the Q1 directory while ensuring that members of the business group preserve access? (Select two).
- A. chgrp Finance Q1/
- B. chown Finance Q1/
- C. chmod u+s Q1/
- D. chmod g+x Q1/
- E. chmod a+x Q1/
- F. chmod g+s Q1/
Answer: A,F
Explanation:
Step-by-Step Comprehensive Detailed
Command
A: chgrp Finance Q1/ changes the group ownership of the directory to Finance.
B: chmod g+s Q1/ sets the setgid bit, ensuring all new files created in the directory inherit the group ownership of the directory.
Why Other Options are Incorrect:
C: chmod u+s affects the user ownership, not group ownership.
D: chmod a+x adds execute permissions but does not affect group ownership.
E: chown Finance Q1/ changes both user and group ownership, potentially removing Business group access.
F: chmod g+x adds execute permissions but does not set group ownership inheritance.
Reference:
CompTIA Linux+ Study Guide: Filesystem Permissions
man chmod
NEW QUESTION # 363
A systems administrator observes high latency values when reaching a remote web server.
Which of the following commands will help determine and isolate issues on the network side?
- A. dig
- B. netstat
- C. route
- D. mtr
Answer: D
Explanation:
https://www.keycdn.com/support/what-is-latency
NEW QUESTION # 364
One leg of an LVM-mirrored volume failed due to the underlying physical volume, and a systems administrator is troubleshooting the issue. The following output has been provided:
Given this scenario, which of the following should the administrator do to recover this volume?
- A. Replace the failed drive and reconfigure the mirror.
- B. Reboot the server. The volume will revert to stripe mode.
- C. Recreate the logical volume.
- D. Reboot the server. The volume will automatically go back to linear mode.
Answer: A
Explanation:
Explanation
The administrator should replace the failed drive and reconfigure the mirror to recover the volume. The LVM (Logical Volume Manager) is a tool for managing disk space on Linux systems. The LVM allows the administrator to create logical volumes that span across multiple physical volumes, such as hard disks or partitions. The LVM also supports different types of logical volumes, such as linear, striped, or mirrored. A mirrored logical volume is a type of logical volume that creates a copy of the data on another physical volume, providing redundancy and fault tolerance. The output shows that the logical volume is mirrored and that one leg of the mirror has failed due to the underlying physical volume. This means that one of the physical volumes that contains the data of the logical volume is damaged or missing. This can cause data loss and performance degradation. The administrator should replace the failed drive and reconfigure the mirror to recover the volume. The administrator should identify the failed physical volume by using commands such as pvdisplay, vgdisplay, or lvdisplay. The administrator should then remove the failed physical volume from the volume group by using the vgreduce command. The administrator should then install a new drive and create a new physical volume by using the pvcreate command. The administrator should then add the new physical volume to the volume group by using the vgextend command. The administrator should then reconfigure the mirror by using the lvconvert command. The administrator should replace the failed drive and reconfigure the mirror to recover the volume. This is the correct answer to the question. The other options are incorrect because they either do not recover the volume (reboot the server. The volume will automatically go back to linear mode or reboot the server. The volume will revert to stripe mode) or do not preserve the data of the volume (recreate the logical volume). References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 10: Managing Storage, pages 333-334.
NEW QUESTION # 365
A Linux administrator was notified that a virtual server has an I/O bottleneck. The Linux administrator analyzes the following output:
Given there is a single CPU in the sever, which of the following is causing the slowness?
- A. The memory is exhausted.
- B. The processes are paging.
- C. The system is running out of swap space.
- D. The CPU is overloaded.
Answer: D
Explanation:
The slowness is caused by the CPU being overloaded. The iostat command shows that the CPU utilization is
100%, which means that there are more processes competing for CPU time than the CPU can handle. The other options are incorrect because:
* The system is not running out of swap space, as shown by the iostat command, which shows that there is no swap activity (si and so columns are zero).
* The memory is not exhausted, as shown by the free -m command, which shows that there is still available memory (avail column) and free buffer/cache memory (buff/cache column).
* The processes are not paging, as shown by the vmstat command, which shows that there are no major page faults (majflt column) and no swap activity (si and so columns). References: CompTIA Linux+ Study Guide, Fourth Edition, page 417-419, 424-425.
NEW QUESTION # 366
A Linux user reported the following error after trying to connect to the system remotely:
ssh: connect to host 10.0.1.10 port 22: Resource temporarily unavailable The Linux systems administrator executed the following commands in the Linux system while trying to diagnose this issue:
Which of the following commands will resolve this issue?
- A. firewall-cmd --zone=public --permanent --add-port=22/udp
- B. firewall-cmd --zone=public --permanent --add-service=ssh
- C. firewall-cmd --zone=public --permanent --add-service=22
- D. systemctl enable firewalld; systemctl restart firewalld
Answer: B
NEW QUESTION # 367
When trying to log in remotely to a server, a user receives the following message:
The server administrator is investigating the issue on the server and receives the following outputs:
Which of the following is causing the issue?
- A. The user has the wrong shell assigned to the account.
- B. The account was locked out due to three failed logins.
- C. The user entered the wrong password.
- D. The wrong permissions are on the user's home directory.
Answer: A
Explanation:
Explanation
The user has the wrong shell assigned to the account, which is causing the issue. The output 1 shows that the user's shell is set to /bin/false, which is not a valid shell and will prevent the user from logging in. The output
2 shows that the user's home directory has the correct permissions (drwxr-xr-x), and the output 3 shows that the user entered the correct password and was accepted by the SSH daemon, but the session was closed immediately due to the invalid shell. The other options are incorrect because they are not supported by the outputs. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, page 413.
NEW QUESTION # 368
Which of the following Git commands would send committed changes to a remote repository?
- A. git commit -a
- B. git push origin master
- C. git stash
- D. git add .
Answer: B
Explanation:
Comprehensive and Detailed Step-by-Step Explanation:
* git push origin master pushes committed changes to the remote repository.
* git stash temporarily saves changes but does not push them.
* git commit -a commits changes but does not send them to the remote repository.
* git add . stages changes but does not commit or push them.
Reference: CompTIA Linux+ Official Study Guide, Chapter on Git and Version Control
NEW QUESTION # 369
Which of the following commands is used to check and prepare software for compilation?
- A. make
- B. ./bash.sh
- C. ./configure
- D. install
Answer: C
Explanation:
The ./configurescript probes the system for required tools and libraries, verifies dependencies, and generates tailored Makefiles. After running it, you use maketo compile the software.
NEW QUESTION # 370
A technician wants to configure a Unix server as a gateway firewall. The technician has implemented the proper ACLs and port address translation policies, but network traffic is not passing from the LAN to the WAN.
Which of the following should the technician configure to for this issue?
- A. Ip_forward
- B. DenyHouse
- C. /etc/service
- D. Squid-service
Answer: B
NEW QUESTION # 371
A DevOps engineer wants to allow the same Kubernetes container configurations to be deployed in development, testing, and production environments. A key requirement is that the containers should be configured so that developers do not have to statically configure custom, environment-specific locations. Which of the following should the engineer use to meet this requirement?
- A. Overlay network
- B. Node affinity
- C. Custom scheduler
- D. Ambassador container
Answer: D
Explanation:
To allow the same Kubernetes container configurations to be deployed in different environments without statically configuring custom locations, the engineer can use an ambassador container (D). An ambassador container is a proxy container that handles communication between containers and external services. It can dynamically configure locations based on environment variables or other methods. The other options are not related to this requirement. Reference:
[CompTIA Linux+ Study Guide], Chapter 11: Working with Containers, Section: Using Ambassador Containers
[How to Use Ambassador Containers]
NEW QUESTION # 372
A systems administrator wants to check for running containers. Which of the following commands can be used to show this information?
- A. docker ps
- B. docker list
- C. docker pull
- D. docker stats
Answer: A
Explanation:
The command that can be used to check for running containers is docker ps. The docker ps command can list all the containers that are currently running on the system. To show all the containers, including those that are stopped, the administrator can use docker ps -a .
NEW QUESTION # 373
A server is experiencing intermittent connection issues. Some connections to the Internet work as intended, but some fail as if there is no connectivity. The systems administrator inspects the server configuration:
Which of the following is MOST likely the cause of the issue?
- A. The IP netmask is wrong for ens3.
- B. The ARP table contains incorrect entries.
- C. An internal-only DNS server is configured.
- D. Two default routes are configured.
Answer: D
Explanation:
The most likely cause of the issue is that two default routes are configured on the server. The default route is the route that is used when no other route matches the destination of a packet. The default route is usually the gateway that connects the local network to the Internet. The server configuration shows that there are two default routes in the routing table, one with the gateway 192.168.1.1 and the other with the gateway 10.0.0.1.
This can cause a conflict and confusion for the server when deciding which gateway to use for the outgoing packets. Some packets may be sent to the wrong gateway and fail to reach the Internet, while some packets may be sent to the correct gateway and work as intended. This can result in intermittent connection issues and inconsistent behavior. The administrator should remove one of the default routes and keep only the correct one for the network. This can be done by using the ip route del command or by editing the network configuration files. This will resolve the issue and restore the connectivity. The other options are incorrect because they are not supported by the outputs. The DNS server, the IP netmask, and the ARP table are not the causes of the issue. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 12:
Managing Network Connections, pages 381-382.
NEW QUESTION # 374
Some servers in an organization have been compromised. Users are unable to access to the organization's web page and other services. While reviewing the system log, a systems administrator notices messages from the kernel regarding firewall rules:
Which of the following commands will remediate and help resolve the issue?
- A.

- B.

- C.

- D.

Answer: D
Explanation:
The command iptables -F will remediate and help resolve the issue. The issue is caused by the firewall rules that block the access to the organization's web page and other services. The output of dmesg | grep firewall shows that the kernel has dropped packets from the source IP address 192.168.1.100 to the destination port 80, which is the default port for HTTP. The command iptables -F will flush all the firewall rules and allow the traffic to pass through. This command will resolve the issue and restore the access to the web page and other services. The other options are incorrect because they either do not affect the firewall rules (ip route flush or ip addr flush) or do not exist (iptables -R). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Securing Linux Systems, page 543.
NEW QUESTION # 375
A Linux administrator is trying to start the database service on a Linux server but is not able to run it. The administrator executes a few commands and receives the following output:
Which of the following should the administrator run to resolve this issue? (Select two).
- A. systemctl unmask mariadb
- B. dnf reinstall mariadb
- C. journalctl -g mariadb
- D. service mariadb reload
- E. systemctl start mariadb
- F. chkconfig mariadb on
Answer: A,E
Explanation:
These commands will unmask the mariadb service, which is currently prevented from starting, and then start it normally. The other commands are either not relevant, not valid, or not sufficient for this task. For more information on how to manage masked services with systemctl, you can refer to the web search result 1.
NEW QUESTION # 376
A systems administrator is tasked with installing GRUB on the legacy MBR of the SATA hard drive. Which of the following commands will help the administrator accomplish this task?
- A. grub-install /dev/sr0
- B. grub-install /dev/sda
- C. grub-install /dev/hd0,0
- D. grub-install /dev/hda
Answer: B
Explanation:
The command that will help the administrator install GRUB on the legacy MBR of the SATA hard drive is grub-install /dev/sda. This command will install GRUB on the master boot record (MBR) of the first SATA disk (/dev/sda). The MBR is the first sector of a disk that contains boot code and a partition table. GRUB will overwrite the boot code and place its own code that can load GRUB modules and configuration files from a specific partition.
The other options are not correct commands for installing GRUB on the legacy MBR of the SATA hard drive.
The grub-install /dev/hda command will try to install GRUB on the first IDE disk (/dev/hda), which may not exist or may not be bootable. The grub-install /dev/sr0 command will try to install GRUB on the first SCSI CD-ROM device (/dev/sr0), which is not a hard drive and may not be bootable. The grub-install /dev/hd0,0 command is invalid because grub-install does not accept partition names as arguments, only disk names. References: Installing GRUB using grub-install; GRUB Manual
NEW QUESTION # 377
A Linux systems administrator needs to persistently enable IPv4 forwarding in one of the Linux systems.
Which of the following commands can be used together to accomplish this task? (Choose two.)
- A. echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
- B. echo 1 > /proc/sys/net/ipv4/ip_forward
- C. sysctl -w net.ipv4.ip_forward=1
- D. sysctl net.ipv4.ip_forward
- E. sysctl -p
- F. echo "net.ipv6.conf.all.forwarding=l" >> /etc/sysctl.conf
Answer: A,C
Explanation:
B: sysctl -w net.ipv4.ip_forward=1
This command immediately enables IPv4 forwarding by setting the system control variable for the current session.
C: echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
This command makes the change persistent by appending the configuration to the /etc/sysctl.conf file, which will be applied at every boot.
To apply the changes made in the sysctl configuration file, you could also run E. sysctl -p, but it is not required for persistence since that file will automatically apply on reboot.
NEW QUESTION # 378
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. grep -i auto /etc/systemd/journald.conf && systemctl restart systemd-journald.service
- B. cat /etc/systemd/journald.conf | awk '(print $1,$3)'
- C. sed -i 's/auto/persistent/g' /etc/systemd/journald.conf && sed -i 'persistent/s/^#//q'
/etc/systemd/journald.conf - D. journalctl --list-boots && systemctl restart systemd-journald.service
Answer: C
NEW QUESTION # 379
......
Updated Test Engine to Practice XK0-005 Dumps & Practice Exam: https://www.actualtests4sure.com/XK0-005-test-questions.html
Dumps Collection XK0-005 Test Engine Dumps Training With 895 Questions: https://drive.google.com/open?id=14gZ0agpSw8nGGvD0Tzm61jZgSYJFhTYg

