CompTIA XK0-005 Practice Test - Questions Answers, Page 30
List of questions
Related questions
overwrite any existing files. Which of the following commands would indicate that the file already exists?
An administrator is provisioning an Apache web server. When the administrator visits the server website, the browser displays a message indicating the website cannot be reached. Which of the following commands should the administrator use to verify whether the service Is running?
The journald entries have filled a Linux machine's /var volume. Which of the following is the best command for a systems administrator to use to free up the disk space occupied by these entries?
A server administrator has scheduled a cron job to run YUM updates on all servers without manual intervention, but kernel packages must be excluded from the updates at all times. Which of the following configuration files needs to be modified to make these changes persistent?
/etc/yum.conf
/etc/dnf/dnf.conf
/etc/yum/pluginconf.d/packages.conf
/etc/yum.repo.d/kernel.repo
A Linux administrator wants a permission bit on a shared folder that allows only the owner of the file within that directory or the root user to delete or rename the file. Which of the following commands will help achieve this goal?
chmod u-w /directory/
chmod a-r /directory/
chmod o-t /directory/
chmod +t /directory/
Linux system users report that over the past few months, a server has stopped responding at least twice each day. Every time this happens, the users have to restart the server to recover it. A systems administrator diagnosing the issue collects the following outputs:
csharp
Output 1
[Tue Aug 31 16:36:42 2021] oom-killer invoked by java: gfp_mask=0x280da2 order=0, oom_score_adj=0
[Tue Aug 31 16:36:42 2021] java cpuset=/ mems_allowed=0
makefile
Output 2
[root@server]# free -m
total used free shared buff/cache available
Mem: 15819 15026 174 92 619 134
Swap: 0 0 0
Which of the following is the best permanent resolution for the system?
More memory resources
More CPU resources
More network bandwidth
Extended root filesystem
A Linux administrator is configuring network traffic forwarding. Despite having proper iptables rules, the traffic forwarding is not working. Which of the following commands will allow Linux to pass network traffic between different interfaces?
nmcli allow-forwarding eth0
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf; sysctl -p
ip route forward allow --all-interfaces; systemctl restart network
modprobe ip_forward
Joe, a user, is unable to log in to the system. The Linux administrator checks the /etc/passwd file and reviews the following output:
Joe:x:1002:1002::/home/Joe:/sbin/nologin
Which of the following should the administrator do to fix this issue?
Remove the x entry in the /etc/passwd file for Joe
Change the /sbin/nologin entry to /bin/sh for Joe
Issue the usermod -l Joe command
Ensure that a corresponding entry is in the /etc/shadow file for Joe
A systems administrator is configuring a Linux system so that network traffic from the internal network 172.17.0.0/16 going out through the eth0 interface would appear as if it was sent directly from this interface. Which of the following commands will accomplish this task?
iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE
firewalld -A OUTPUT -s 172.17.0.0/16 -o eth0 -j DIRECT
nmcli snasq-traffic eth0 -s 172.17.0.0/16 -j MASQUERADE
ifconfig --nat eth0 -s 172.17.0.0/16 -j DIRECT
An administrator thinks that a package was installed using a snap. Which of the following commands can the administrator use to verify this information?
snap list
snap find
snap install
snap try
Question