XK0-004 : CompTIA Linux+ : Part 10
-
A junior systems administrator is tasked with providing the network_administrators group the ability to perform sudo without prompting for a password. Which of the following steps should the administrator perform to accomplish this task? (Choose two.)
- Use visudo to edit the /etc/sudoers file and add network_administrators to the “wheel” group
- Use vi to edit the /etc/sudo file and add network_administrators to the “wheel” group
- Provide all network_administrators with the “root” account password
- Add the network_administrators ALL=(ALL) NOPASSWD: ALL directive to the /etc/sudoers file
- Add the network_administrators =(ALL) NOEXEC: ALL directive to the /etc/sudoers file
-
A storage administrator in a virtualized environment has been told by a user that there is no space left on the volume to which the user can write. However, a check reveals that there is 20GB of unused space. Which of the following explains the discrepancy?
- The drive is not formatted
- The drive is thin provisioned
- The drive is thick provision eager zeroed
- The drive space is overallocated
-
A systems administrator has scheduled a system update for a server. The update includes a resynchronization of the package database and updates to the current packages and the system distribution packages. Which of the following commands contains the proper order of this update?
- apt-get upgrade, apt-get dist-upgrade, apt-get update
- apt-get update, apt-get upgrade, apt-get dist-upgrade
- apt-get dist-upgrade, apt-get upgrade, apt-get update
- apt-get update, apt-get dist-upgrade, apt-get upgrade
-
An administrator receives the following message on a remote server: Cannot open display. Which of the following should the administrator have used to log in to the server?
- xrdp –h server.company.com
- ssh –X server.company.com
- xvnc server.company.com
- rdesktop server.company.com
-
A junior administrator is installing kernel modules. The administrator is given a checklist that outlines the following tasks to be completed:
Display currently installed module version.
Display which modules loaded at startup.Which of the following commands would be used to accomplish these tasks? (Choose two.)
- cat /etc/issue
- insmod
- lsmod
- rmmod
- depmod
- dmesg
-
An administrator wants to know the amount of memory installed on a Linux server. Which of the following commands can be used to accomplish this task?
- cat /sys/proc/meminfo
- cat /proc/meminfo
- cat /proc/sys/meminfo
- cat /sys/meminfo
-
A Linux administrator is helping the security team troubleshoot an SELinux policy violation incident. Which of the following would be the BEST utility command to display SELinux violation and AVC denial messages?
- journalctl | grep sealert
- sealert –a /var/log/audit/audit.log
- aureport | grep AVC
- cat /var/log/messages | grep selinux
-
A systems administrator received a request to change the hostname to a new name. Which of the following file configurations should be changed to fix the hostname in the server?
- /etc/sysconfig/network
- /etc/hosts
- /etc/resolv.conf
- /etc/sysconfig/nsswitch.conf
-
An administrator notices the HISTSIZE variable is 50, using the commands below:
HISTSIZE=50
export HISTSIZEThe administrator rechecks the HISTSIZE value using echo HISTSIZE but gets no value. Which of the following commands should the administrator use to retrieve its value?
- printenv | grep $HISTSIZE
- echo HISTSIZE
- printf HISTSIZE
- grep $HISTSIZE
-
Users in the payroll department are not configured to use DNS due to security concerns. The users ask the junior Linux administrator to configure their workstations to access the payroll server at 192.168.204.11 by the name “Payroll”. Which of the following commands should the administrator issue to meet this request?
- echo “nameserver 192.168.204.11 #Payroll” >> /etc/resolv.conf
- echo “net.ipv4.ip_dynaddr=192.168.204.11 Payroll” >> /etc/sysctl.conf
- echo “192.168.204.11 Payroll” >> /etc/hosts
- echo ‘IPADDR=”192.168.204.11” #Payroll’ >> /etc/network/interface
-
A systems administrator downloads an application’s source files, compiles the application, and installs it per the application’s installation instructions. When trying to run the application, the system states:
$ occmd
bash: occmd: command not found…Running the locate command shows it does exist in the following location:
/opt/occmd/bin/occmd
Which of the following should the administrator do to allow the command to run properly? (Choose two.)
- sudo ln –s /opt/occmd/bin/occmd /usr/local/bin/occmd
- echo “export PATH=$PATH:/opt/occmd/bin” >> ~/.bashrc
- mv /opt/occmd ~/ && ln –s ~/occmd/bin/occmd ./occmd
- echo “#!/bin/bash \n ${which occmd}” > /usr/bin/occmd.sh
- sudo mv /opt/occmd/bin/occmd /etc/bin/
- cd /opt/occmd/bin && chmod +x ./occmd && restorecon –rv *
-
A Linux administrator tries to ping a hostname in a network but receives the message: hostname not found. The administrator is sure the name exists on the network and wants to verify if the DNS server is correctly configured on the client. Which of the following files should the administrator use to verify this information?
- /etc/named.conf
- /etc/resolv.conf
- /etc/nsswitch.conf
- /etc/network
-
Users are unable to connect to a server using HTTPS. The administrator runs the following command on the remote system:
Then, the administrator runs the following command from a local workstation:
Which of the following steps should the administrator take to address the issue?
- Start the application to run on port 443
- Configure the application to run on an active port
- Allow port 443 through the firewall
- Update the self-signed certificate
-
A Linux administrator is restoring the SELinux contexts on an entire system. Which of the following commands is the BEST option to complete this task?
- setenforce 0 && reboot
- setfacl –bR / && reboot
- touch /.autorelabel && reboot
- restorecon / && reboot
-
An administrator has a CSV file named hosts.csv. The contents of hosts.csv include the following:
192.168.2.57,lnx1prd.example.com,Linux,Production
192.168.2.58,lnx2prd.example.com,Linux,Production
192.168.1.4,server15.example.com,Windows,DevelopmentThe administrator needs to create a second comma-separated list of only the Linux server IP addresses. Which of the following commands would achieve this need?
- for ip in $(grep “Linux” hosts.csv | cut –d”,” –f1); do echo –n “$ip,”; done
- for ip in $( cut –d”,” –f1 hosts.csv | grep “Linux”); do echo –n “$ip,”; done
- for ip in $(grep “Linux” hosts.csv | sed “/$1//’); do echo –n “$ip,”; done
- for ip in $(awk –F, ‘{print $1}’ hosts.csv | grep “Linux”); do echo –n “$ip,”; done
-
An administrator is installing a Linux VM on a personal hypervisor. The administrator wants to have the VM’s IP address on the same network as the hypervisor host so the VM has the same network properties as the physical interface of the host. To which of the following should the administrator set the network properties?
- Host-only network
- NAT network
- Bridge network
- Overlay network
-
A raw VM image is being compressed with bzip2 and copied to a flash drive at /dev/hdb for off-site use by the marketing department. Which of the following command lines accomplishes this task?
- mv /vm/mkgt.img | bzip2 /dev/hdb/mkgt.img.bz2
- bzip2 –c /vm/mktg.img | dd of=/dev/hdb
- cp /vm/mktg.img | bzip2 /dev/hdb/mktg.img.bz2
- cp –a –r /vm/mktg.img bzip2 /dev/hdb/mktg.img.zip
-
A systems administrator wants to install a new application that requires the newmod kernel module. Which of the following commands should the systems administrator use?
- lsof newmod
- modinfo newmod
- lsmod newmod
- modprobe newmod
-
A server, which is used to collect data about the network and datacenter environment via SNMP, is running out of space. Which of the following should the server administrator implement to reduce disk utilization?
- journald
- Snapshots
- logrotate
- tar -cvf
-
In which of the following directories is the vmlinuz file located?
- /boot
- /etc
- /bin
- /proc
Subscribe
0 Comments
Newest