CompTIA Linux+ (XKO-004) and LPIC-1 Post-Assessment
Which of the following is the default nice value for a new process?
10
What is the SysV numerical representation of the Systemd graphical.target runlevel?
5
Tony wants to forward all of his emails to another email address. How can he enable this?
Create a ~/.forward file containing the email address to forward to
Which of the following is not a valid default chain type for netfilter?
DISCARD
Carissa is looking at using a container software to quickly deploy new container images for certain systems. Which of the following might she choose to provide this functionality?
Docker
What term can be used to describe the practice of using build automation and configuration management to provide a functional cloud infrastructure?
IaC
Which of the following is true about the dig command?
It is used to look up DNS entries
If a hard link is created for a file and then the original file is deleted, what is the status of the hard link as a result?
The hard link is still accessible with all of the original contents of the original file.
What is the version of X Windows that was designed to replace X.org?
Wayland
Which of the following is not a valid construct in shell scripting that can be used to create a loop to execute the same code, perhaps with different variables, multiple times?
during
Which of the following commands would add custom log entries to the journald database?
logger
Which of the following commands can be used to view and set the time zone on a Linux system?
timedatectl
Which of the following commands, when input is piped to it, will write the output of the previous command to a file as well as to the terminal screen?
tee
Angie wants to update the access and modification times of an existing file named mydoc.txt. Which of the following commands could she use to accomplish this task?
touch mydoc.txt
When a new file is created, Linux needs to determine what permissions are initially set for that file. Which of the following commands can modify the default permissions that are set on files created in a given directory?
umask
Jason notices that there are some duplicate entries in a csv file that he occasionally uses. He wants to be able to export everything but the duplicate lines to another file. Which utility might Jason use to do this?
uniq
Where are scheduled commands stored on Fedora Linux systems?
/var/spool/at
Simon has a laptop computer running the Linux operating system. He travels a good bit and realizes that one of the risks he faces is theft of the laptop, as someone could pull out the hard drive and mount it to another computer and be able to access the files on the drive. Which of the following could he use to encrypt the entire filesystem using AES encryption?
LUKS
When a process finishes executing, the parent process must check to see if it executed successfully. If it has, then it should release the child process PID. What is the state that a process is in while waiting for the parent to release the child process PID?
zombie
Which of the following will delete the first job scheduled by the at utility? (Choose two.)
atrm 1 and at -d 1
Which of the following types of transmissions are part of IPv4, but not IPv6?
broadcast
Which of the following commands can be used to show the total number of inodes, the number of inodes that have been used, and the number of free inodes in a filesystem?
df -i
Which of the following commands could locate files within the /tmp directory that are more than 2 weeks old and then delete them?
find /tmp -mtime +14 | xargs rm
Jason is working on a Linux server and had shut down the ethernet connection while performing some maintenance. Which of the following commands could he use to bring the connection back up? (Choose all that apply.)
ip link set eth0 up, ifconfig eth0 up, and ifup eth0
Which of the following commands can be used to see a list of all printers on the system along with their status?
ipstat
Which of the following commands would you use to find out what options can be used with the ps command?
man ps
Which of the following commands sends an ICMP echo request across the network to another node? (Choose all that apply.)
mtr and ping
Celeste needs to rename the project5 directory to something a bit more descriptive. Utilizing the command line, which of the following would accomplish this task? (Choose all that apply.)
mv project5 newbuildingproject
In a system that is running Network Manager, which command can be used to view or modify connection information at the command prompt?
nmcli
Which of the following commands can display a list of processes in a hierarchical format showing parent and child relationships?
pstree
Which of the following commands can be used to create a physical volume out of an unused partition?
pvcreate
Cameron is working at the command line and can see the name of the current subdirectory he is in, but wants to see the entire path and not just the current subdirectory name. Which of the following commands could he use to see that information?
pwd
Which of the following commands will convert an RPM package to a cpio archive?
rpm2cpio
Benjamin wants to run a script in the background. Which of the following will accomplish this?
./myscript.sh &
The syslog daemon can send information to another computer using the format facility.priority. Where can this information be configured?
/etc/rsyslog.conf
Carol wants to include a copy of the acceptable usage policy in every new user's home directory by default when the new user's account and home directory are created. Where can she put a copy of this document to accomplish this goal?
/etc/skel
Jackie wants to configure journald to forward all events to the System Log daemon. Which of the following files should she modify to enable this setting?
/etc/systemd/journald.conf
To enable TCP wrappers, you must modify the appropriate file in which directory?
/etc/xinetd.d/
Which directory would a user jsmith look in to modify the scripts that are run specifically related to their login?
/home/jsmith/
Which of the following directories should be used to mount CDs on a Linux operating system?
/media/cdrom/
Which of the following tools works only with GPT partitions?
gdisk
Which of the following is the command that can be used to generate a public/private key pair for GPG?
gpg --gen-key
Steven has a Linux server that has implemented the XFS filesystem. He believes there is a corruption issue and wants to check and repair it. Which of the following tools can normally be used to fix the issue?
xfs_repair
Which of the following configuration files are executed after a new login as well as when a new BASH shell is created after login?
~/.bashrc
Which of the following commands will display the shell that the user is currently using? (Choose two.)
echo $SHELL and echo $0
Which of the following filesystems are commonly used for USB flash memory drives and is supported by a number of operating system platforms?
exFAT
Which of the following keystroke combinations will exit the vi text editor? (Choose two.)
:q and ZZ
Andrew opens a terminal to investigate user reports that some users are able to get to the intranet homepage while others are not. He is able to determine that some of them are using URLs beginning with intranet.contoso.com while others are using www.intranet.contoso.com. After pulling up the command prompt he verifies that they resolve to different IP addresses. Which of the following services running on an internal Linux server does he need to check the configuration to correct this problem?
DNS
Gary wants to install a software package that will monitor log files for invalid access attempts to a system and automatically update netfilter firewall rules to prevent similar attempts. What software packages would fit the description of his requirements? (Choose two.)
DenyHosts and Fail2ban
Murray runs the lsmod command on a guest virtual machine. He sees a few modules that start with virtio. Which of the following hypervisors is he most likely running?
KVM
Which of the following display managers is the default display manager used by the Ubuntu Linux distribution?
LightDM
Which of the following NSA created technologies uses labels to enforce security policies on a Linux system?
SELinux
Which of the following protocols is used when guaranteed delivery of packets with error detection is a requirement?
TCP
Sheila is working on an older Linux server and notices a file she hasn't seen before named menu.lst. What is the functionality of this file?
This is the list of operating systems available to boot using the GRUB legacy bootloader.
Which of the following can be directly created out of one or more physical volumes?
Volume Groups
Bob presses the power button on his desktop computer and Linux then goes through the safe shutdown process. Which of the following technologies make this possible, rather than just cutting power immediately?
acpid
Which of the following Debian Package Management commands lists the dependencies of the BASH package?
apt-cache depends bash
You have just downloaded a software package that has been archived using the tar utility and compressed using the gzip utility. Which of the following are possible filenames that you might expect to see on this file? (Choose all that apply.)
calculator.tgz and calculator.tar.gz
Mark has written a shell script that displays a menu to the user and asks them to enter a choice from the menu. Depending on what choice the user types in as a response, the script should then perform another action. What kind of construct would Mark add to determine what the next action should be? (Choose two.)
case and if
Francis has just taken over a new project. You need to change the owner of the project directory as well as all of the files and subdirectories in that directory to be owned by Francis. Which of the following commands could you use? (Choose all that apply)
chown -R francis projecto
Ferris needs to change the ownership of a directory named projectx to a new user and all of the directories within it. Which of the following commands could he use?
chown -R projectx billyj
You have a Linux ISO that you downloaded from the Internet and want to create a bootable USB thumb drive to use for installing Linux onto a laptop that does not have an optical drive. Which of the following utilities could you use to accomplish this task?
dd
Andrew wants to search a text file to find lines that match the type of data that he is looking for by using a regular expression. Which of the following commands could Andrew use to do this? (Choose all that apply.)
grep and egrep
Ethan is installing a new server in the data center. The server should connect to the SAN over Fibre Channel but does not have the necessary hardware installed to connect yet. He decides to pull up the website of an online retailer. What search term should he use to look for the hardware he needs?
host bus adapter
Which of the following commands, when run, would have an impact on the FQDN of a Linux server after a reboot?
hostnamectl set-hostname server5
Which command can be used to identify which shared libraries are required by the BASH shell executable?
ldd /bin/bash
Peter has configured a Linux server so that the operating system and swap are on /dev/sda and the user home directories are on /dev/sdb. He wants to create a link in his home directory to the syslog file in /var/log. Which of the following commands could create that link?
ln -s /var/log/syslog /home/peter/syslog
Which of the following commands can be used to display information about connected USB controllers and devices on a Linux installation?
lsusb
Bruce has transferred a large zip file from one server to another. He wants to verify that the file has transferred correctly and that there was no corruption while it was being transferred over the network. Which of the following utilities could he use to verify that the file was transmitted without error? (Choose all that apply.)
md5sum and sha1sum
Which filesystem is the /proc directory mounted to?
procfs
Which of the following commands will show all processes, including ones that are not associated with a terminal session? (Choose all that apply.)
ps -ax
Barney had previously disabled virtual memory for a development environment workstation. Which of the following commands could he use to re-enable it?
swapon
Christine wants to watch the /var/log/syslog file in real time as he performs a few tasks on the server. Which of the following tasks will allow him to do this?
tail -f /var/log/syslog
Katy wants to see the last 10 entries in the log file /var/log/auth.log. Which of the following commands will display only those 10 entries?
tail /var/log/auth.log
Robert needs to perform maintenance on one of the web servers. Part of the maintenance tasks requires that nobody else is connected to the server. Which of the following commands could he use to ensure that nobody else is allowed to connect?
telinit 1