Practice Free XK0-005 Exam Online Questions
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 . chmod g+s Q1/
- C . chmod u+s Q1/
- D . chmod a+x Q1/
- E . chown Finance Q1/
- F . chmod g+x Q1/
A,B
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
A systems administrator detected corruption in the /data filesystem.
Given the following output:
Which of the following commands can the administrator use to best address this issue?
- A . umount /data
mkfs. xfs /dev/sclcl
mount /data - B . umount /data
xfs repair /dev/ sdcl
mount /data - C . umount /data
fsck /dev/ sdcl
mount / data - D . umount /data
pvs /dev/sdcl
mount /data
B
Explanation:
The xfs repair command is used to check and repair an XFS filesystem, which is the type of filesystem used for the /data partition, as shown in the output. The administrator needs to unmount the /data partition before running the xfs repair command on it, and then mount it back after the repair is done. For example: umount /data; xfs_repair /dev/sdcl; mount /data. The mkfs.xfs command is used to create a new XFS filesystem, which would erase all the data on the partition. The fsck command is used to check and repair other types of filesystems, such as ext4, but not XFS. The pvs command is used to display information about physical volumes in a logical volume manager (LVM) setup, which is not relevant for this issue.
30 0.01 0.29 50.38 4.00 19.01
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sdd 15.65 0.48 0.83 4936250 8513501
# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 64K 16G 1% /dev/shm
/dev/mapper/root 35G 8.8G 26G 26% /
/dev/sda2 497M 144M 354M 29% /boot
/dev/mapper/tmp 10G 38M 10G 1% /tmp
/dev/mapper/var 15G 13G 2.2G 86% /var
/dev/mapper/varlib 650G 397G 254G 62% /var/lib
/dev/mapper/varlog 15G 9.5G 5.5G 64% /var/log
/dev/mapper/varaudit 15G 72M 15G 1% /var/log/audit
Which of the following is most likely the issue?
- A . The CPU is mostly waiting for I/O operations.
- B . / filesystem does not have enough storage allocated.
- C . /var filesystem is almost full.
- D . The CPU capacity is inadequate.
A
Explanation:
The high %iowait value (50.38%) in the iostat output suggests that the CPU is waiting for I/O operations to complete, often caused by storage bottlenecks rather than a lack of CPU or memory resources. CompTIA Linux+ recommends checking I/O wait times to assess storage-related slowdowns, indicating potential disk access issues.
Reference: CompTIA Linux+ Study Guide.
A user reported issues when trying to log in to a Linux server.
The following outputs were received: Given the outputs above.
Which of the following is the reason the user is unable to log in to the server?
- A . User1 needs to set a long password.
- B . User1 is in the incorrect group.
- C . The user1 shell assignment incorrect.
- D . The user1 password is expired.
D
Explanation:
The user1 password is expired. This can be inferred from the output of the chage -l user1 command, which shows the password expiration information for user1. The output shows that the password expired on 2020-10-01, and the account expired on 2020-10-08. This means that user1 cannot log in to the server unless the password and account are reactivated by the system administrator.
The other options are not correct based on the outputs above. User1 does not need to set a long password, because the output of the passwd -S user1 command shows that the password has a minimum length of 5 characters, which is met by user1’s password. User1 is not in the incorrect group, because the output of the groups user1 command shows that user1 belongs to the app group, which is presumably the correct group for accessing the server. The user1 shell assignment is not incorrect, because the output of the grep user1 /etc/passwd command shows that user1 has /bin/bash as the default shell, which is a valid and common shell for Linux users.
Which of the following is the best tool for dynamic tuning of kernel parameters?
- A . tuned
- B . tune2fs
- C . tuned-adm
- D . turbostat
A
Explanation:
The tuned application is the best tool for dynamic tuning of kernel parameters, as it monitors the system and optimizes the performance under different workloads. It provides a number of predefined profiles for typical use cases, such as power saving, low latency, high throughput, virtual machine performance, and so on. It also allows users to create, modify, and delete profiles, and to switch between them on the fly. The tuned application uses the sysctl command and the configuration files in the /etc/sysctl.d/ directory to adjust the kernel parameters at runtime.
Reference
Chapter 2. Getting started with TuneD – Red Hat Customer Portal, paragraph 1 Kernel tuning with sysctl – Linux.com, paragraph 1
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 system is running out of swap space.
- B . The CPU is overloaded.
- C . The memory is exhausted.
- D . The processes are paging.
B
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).
Reference: CompTIA Linux+ Study Guide, Fourth Edition, page 417-419, 424-425.