XK0-004 : CompTIA Linux+ : Part 08
-
A systems administrator installs a simple package, but the Linux system returns the following error: rpmdb open fails. To verify if there is a problem in the RPM database, the systems administrator runs the following command:
Which of the following commands should the systems administrator run NEXT to resolve this issue?
- cd/var/lib/rpm; rpm –rebuilddb ; rm -f _db*; yum clean all
- cd/var/lib/rpm; rpm -qd; rpm –rebuilddb; yum clean all
- cd/var/lib/rpm; rpm -qa; rm -f _db*; yum clean all
- cd/var/lib/rpm; rm -f _db*; rpm –rebuilddb; yum clean all
-
Joe, a user, reports that he is no longer able to write files to his home directory. Upon inspection, the Linux administrator discovers that attempting to create a new file gives the following error: No space left on device. However, the disk and partition are not full. Which of the following commands would be BEST for the administrator to use to continue troubleshooting this problem?
- rm -Rf ~/.*
- fsck -y /dev/sda1
- df -i
- fdisk /dev/sda
-
A Linux administrator is adding a static IP address to a network interface on a Linux system. The administrator modifies the ifcfg- eth0 configuration file with the following settings:
After the administrator restarts the Linux server, the system is not connected to the network. Which of the following configuration settings needs to be changed?
- Set BOOTPROTO to BOOTP and USERCTL to yes.
- Set BOOTPROTO to NONE and ONBOOT to yes.
- Set USERCTL to yes and ONBOOT to no.
- Set NETMASK to 255.255.0.0 and ONBOOT to yes.
-
A company wants to provide internal identity verification services for networked devices. Which of the following servers should be installed?
- SHH
- VPN
- CA
- DHCP
- DNS
-
An administrator notices a directory on a web server named /var/www/html/old_reports that should no longer be accessible on the web. Which of the following commands will accomplish this task?
- chmod 000 /var/www/html/old_reports
- chgrp root /var/www/html/old_reports
- chown apache /var/www/html/old_reports
- setenforce apache /var/www/html/old_reports
-
A Linux administrator wants to configure log messages of critical or higher severity levels from the cron utility to be logged to the console. Which of the following will accomplish this objective?
- Edit the /etc/logrotate.d/cron file to include the line cron.emerg.* /dev/console
- Edit the /etc/rsyslog.conf file to include the line cron.emerg.* /dev/console
- Edit the /etc/logrotate.conf file to include the line cron.emerg.* /dev/console
- Edit the /etc/rsyslog.d/conf file to include the line cron.emerg.* /dev/console
-
A file server is sharing a directory called /share between team members inside a company. The fileshare needs to be moved from serverA to /newshare located on serverB with all permissions and attributes preserved. Which of the following commands would BEST achieve this task?
- rsync -aHAX /share/* serverB:/newshare
- dd if=/share/* of=serverB:/newshare
- tar -cvf /share/* serverB:/newshare
- mirrorlv /share/* serverB:/newshare
-
An administrator needs to look at a log for an application on a systemd-based system. There is no log for this application in /var/log. Which of the following is another way to view the application log on this system?
- tail -f /var/log/secure
- journalctl –u application
- systemctl application.service
- watch /var/lib/application/
-
Which of the following is true about Type 2 hypervisors?
- Type 2 hypervisors run on top of another general purpose OS.
- Type 2 hypervisors are often called bare-metal or native hypervisors.
- Type 2 hypervisors offer a performance increase to the guests in comparison to a Type 1 hypervisor.
- Only Type 2 hypervisors allow direct access to CPU virtualization features.
-
A security administrator wants to display a warning banner before a user logs in. Which of the following files must be edited to make this happen?
- /etc/services
- /etc/issue
- /etc/hosts
- /etc/motd
-
Using which of the following control mode commands is the correct way to substitute all occurrences of /dev/sdc with /dev/sdd while editing a file in vi?
- :s//dev/sdc//dev/sdd
- :s/\/dev\/sdc/\/dev\/sdd/g
- :s/\/dev\/sdc/\/dev\/sdd
- :%s/\/dev\/sdc/\/dev\/sdd
-
A user needs to modify the IP address of a laptop. Which of the following files can be used to configure the network interface named eth0?
- /etc/sysconfig/network/interfaces.cnf
- /system/config/interfaces
- /etc/sysconfig/network-scripts/ifcfg-eth0
- /system/networking/ifconfig
- /etc/interfaces/eth0.conf
-
A user wants to use terminal services from a Windows workstation to manage a Linux server. Which of the following should be installed on the Linux server to enable this functionality?
- VNC
- rdesktop
- SPICE
- XRDP
-
On a UEFI-based system, which of the following invokes GRUB2 from the EFI command prompt?
- boot//EFI/grub2.efi
- EFI/grub2.efi
- /boot/EFI/grub2.efi
- /grub2.efi
-
A systems administrator notices a large number of autoloaded device modules are no longer needed and decides to do a cleanup of them. Which of the following commands will accomplish this task?
- rmmod -c
- depmod -r
- insmod -c
- modprobe -r
-
A Linux administrator looks at the /etc/timezone file and determines the need to change the time zone from California to New York temporarily. Which of the following commands will accomplish this?
- sed -f TZ=America/New_York
- cat TZ=America/New_York
- export TZ=America/New_York
- printf TZ=America/New_York
-
A user has been locked out of an account due to too many failed password attempts. Which of the following commands will unlock the user’s account?
- pam_tally2 –user=user –reset
- passwd -u user -G root
- usermod -u user -G root
- chage -1 user=user –reset
-
A systems administrator receives a report that the web server is not running after a planned system reboot. After starting the web server manually, which of the following commands should the administrator issue to ensure the web server starts at boot time?
- systemctl service on
- systemctl enable <name>.service
- systemctl service enable
- systemctl on <name>.service
-
An administrator is reviewing updates in the master online Git repository and notices a file named .htaccess. The file contains passwords and should only be in the administrator’s local repository, not the online one. Which of the following would prevent this file from appearing online in the future?
- git commit -m “File Update” -x .htaccess
- sed -i ‘s/#Preserve Hidden=True/Preserve Hidden=True/g’ .git/config
- chown nobody:nodoby .htaccess
- echo “.htaccess” >> .gitignore
-
A technician wants to secure a sensitive workstation by ensuring network traffic is kept within the local subnet. To accomplish this task, the technician executes the following command:
echo 0 > /proc/sys/net/ipv4/ip_default_ttl
Which of the following commands can the technician use to confirm the expected results? (Choose two.)
- tcpdump
- traceroute
- route
- iperf
- ip
- arp
Subscribe
0 Comments
Newest