CompTIA XK0-005 Real Exam Questions
The questions for XK0-005 were last updated at Dec 01,2024.
- Exam Code: XK0-005
- Exam Name: CompTIA Linux+ Exam
- Certification Provider: CompTIA
- Latest update: Dec 01,2024
A Linux engineer has been notified about the possible deletion of logs from the file /opt/app/logs.
The engineer needs to ensure the log file can only be written into without removing previous entries.
Which of the following commands would be BEST to use to accomplish this task?
- A . chattr +a /opt/app/logs
- B . chattr +d /opt/app/logs
- C . chattr +i /opt/app/logs
- D . chattr +c /opt/app/logs
A Linux administrator needs to resolve a service that has failed to start.
The administrator runs the following command:
The following output is returned
Which of the following is MOST likely the issue?
- A . The service does not have permissions to read write the startupfile.
- B . The service startupfile size cannot be 81k.
- C . The service startupfile cannot be owned by root.
- D . The service startupfile should not be owned by the root group.
Which of the following is a function of a bootloader?
- A . It initializes all the devices that are required to load the OS.
- B . It mounts the root filesystem that is required to load the OS.
- C . It helps to load the different kernels to initiate the OS startup process.
- D . It triggers the start of all the system services.
A Linux administrator would like to use systemd to schedule a job to run every two hours. The administrator creates timer and service definitions and restarts the server to load these new configurations. After the restart, the administrator checks the log file and notices that the job is only running daily.
Which of the following is MOST likely causing the issue?
- A . The checkdiskspace.service is not running.
- B . The checkdiskspace.service needs to be enabled.
- C . The OnCalendar schedule is incorrect in the timer definition.
- D . The system-daemon services need to be reloaded.
A systems administrator wants to be sure the sudo rules just added to /etc/sudoers are valid.
Which of the following commands can be used for this task?
- A . visudo -c
- B . test -f /etc/sudoers
- C . sudo vi check
- D . cat /etc/sudoers | tee test
A Linux system is getting an error indicating the root filesystem is full.
Which of the following commands should be used by the systems administrator to resolve this issue? (Choose three.)
- A . df -h /
- B . fdisk -1 /dev/sdb
- C . growpart /dev/mapper/rootvg-rootlv
- D . pvcreate /dev/sdb
- E . lvresize CL +10G -r /dev/mapper/rootvg-rootlv
- F . lsblk /dev/sda
- G . parted -l /dev/mapper/rootvg-rootlv
- H . vgextend /dev/rootvg /dev/sdb
A Linux administrator is troubleshooting SSH connection issues from one of the workstations.
When users attempt to log in from the workstation to a server with the IP address 104.21.75.76, they receive the following message:
The administrator reviews the information below:
Which of the following is causing the connectivity issue?
- A . The workstation has the wrong IP settings.
- B . The sshd service is disabled.
- C . The server’s firewall is preventing connections from being made.
- D . The server has an incorrect default gateway configuration.
After listing the properties of a system account, a systems administrator wants to remove the expiration date of a user account.
Which of the following commands will accomplish this task?
- A . chgrp system accountname
- B . passwd Cs accountname
- C . chmod -G system account name
- D . chage -E -1 accountname
A systems administrator requires that all files that are created by the user named web have read-only permissions by the owner.
Which of the following commands will satisfy this requirement?
- A . chown web:web /home/web
- B . chmod -R 400 /home/web
- C . echo "umask 377" >> /home/web/.bashrc
- D . setfacl read /home/web
A systems engineer is adding a new 1GB XFS filesystem that should be temporarily mounted under /ops/app.
Which of the following is the correct list of commands to achieve this goal?
A)
B)
C)
D)
- A . Option A
- B . Option B
- C . Option C
- D . Option D