LinuxAcademy Practice Test Flashcards
What is the name of the process in which a client locates a server over DHCP, in order to download the boot files over TFTP?
In the Pre-Execution Environment, or PXE boot, the client machine searches for a server machine from which to download the boot image over the trivial file transfer protocol.
What is contained in the /etc/fstab file?
The fstab ( file systems table ) file is where file system mount points are configured if the mount needs to persist past a reboot. Lesson: Mounting and Unmounting File Systems
fsck -r LABEL=BACKUP fsck from util-linux 2.23.2
Your company has an issue on one of the backup drives that are connected to a server. A junior administrator has been tasked with running the fsck utility on the suspect drive. The junior administrator ran the command shown below to initiate the fsck on the drive labeled BACKUP and sees the listed output, what is the most likely issue?
e2fsck 1.42.9
/dev/sdb2 is mounted
e2fsck: Cannot continue, aborting.
fsck cannot run on mounted drives, and it is necessary to unmount the drive prior to running the command
In the nmcli tool, what is meant by dev and what is meant by con?
nmcli dev refers to devices and their configuration.
nmcli con refers to the connections that are configured on the devices.
What is the purpose of the ldd command?
ldd prints the shared objects (shared libraries) required by each program or shared object specified on the command line.
What is located in the /var directory?
Log files are one of the things that are located in /var
What is the name of the process that directs the system to boot from an image file rather than the first bootable media?
This is the name of the process that directs a system to boot from an image file. Usually this is an ISO file.
Fill in the blank:
_ is the default package tool used on Debian-based systems.
The Advanced Package Tool (APT) is the default package manager for Debian-based systems.
What is the output of the following command?
timedatectl
This command with no switches will output the settings for the date and time on the system.
The temporary file system that is loaded at boot is called?
initrd or initial ramdisk / initial file system
What is the name of the boot process that allows a client to mount a network share as its root file system?
Boot from NFS
Which of the following are ‘pseudo’ file systems?
/proc – This is a pseudo file system, and it contains the processes that are running on the system
/sys–This is a pseudo file system that contains the system info about kernel modules and hardware.
What is the result of running the following command?
localectl list-locales
It will list all of the available languages and encoding settings that are available on the system.
What is network bonding?
This process it allows you to create redundant network interfaces, so that if one fails the others can carry the traffic.
What is the purpose of the /etc/hosts file?
This is the local DNS look up location, and by default it is checked first for DNS names.
This file contains entries such as localhost, and it is used to speed up name resolution that does not need to be done over the internet.
What is the command that is used to create a file system on a disk?
mkfs
What is the output of the ifconfig command when it is run with no arguments?
With no arguments, this command prints the current configuration of the network interfaces
What command would I use to understand how much free space I have left on my filesystem?
df
This command shows how much free space I have, and when combined with the -h flag it will present the information in a human-readable format
On modern systems, the Basic Input Output System (BIOS) has been replaced by what technology?
The Unified Extensible Firmware Interface replaced the older BIOS system.
What is the purpose of rotating the log files?
This prevents the logs from becoming too large to parse or archive, and it assists with searching the logs for entries if each log file encompasses a smaller time frame.
Fill in the blank. __ is an improved version of the grand unified bootloader
GRUB2
In networked systems, what is the name of the protocol used to dynamically assign IP addresses to network interfaces?
The Dynamic Host Configuration Protocol is used to assign addresses dynamically to network interfaces
A junior administrator in your organization has written a Bash script named logparse.sh, and has saved the file on the system. The junior admin is not able to remember where the file was saved, and is now concerned that there might be an issue with the disks as the result of running locate logparse.sh is empty. What is the most likely solution to the issue?
The command updatedb needs to be run from an authorized account so that the new file is entered into the locate database.
Which of the following is a Linux desktop environment?
KDE
GNOME
XFCE
Fill in the blanks: ___ ____ extend the functionality of the kernel.
Modules extend a kernel’s functionality.
What is the purpose of the | operator in Bash?
This is the ‘pipe’ operator. It redirects the stdout from the left into the stdin on the right.
Which of the following commands will search for the file examaple.sh in the current directory, recursively?
find . -name example.sh
This is the correct format of the find command. . is the current directory, and with no other flags it will search all subdirectories recursively for the file that is indicated by the -name flag.
Which of the following are a part of MFA (Multi-Factor Authentication)? Select three
Something you are, such as a fingerprint
Something you know, such as a password
Something you have, such as a token
Which of the following are text editors?
vi
nano
vim
What can be done to secure the bootloader so that it is not possible to simply enter single user mode from the prompt?
Apply a bootloader password.
This prevents people, who have physical access to the terminal, from subverting the bootloader process.
Which of the following are a best practice for a secure system? (Select three)
Restricting cron access – This should be done to prevent malicious scheduled jobs from running on the system.
Enabling SSL/TLS–This should be enabled wherever possible, as it keeps network traffic encrypted.
Disable the root account–This is always a best practice. Users should be required to elevate privileges each time that they need them
When issuing the userdel command, what is the function of the -r flag?
This will remove the user’s home directory in addition to removing the users account.
Which boot process is in the most correct order?
UEFI / GRUB2 / Kernel / systemd
This is the correct order: UEFI calls the bootloader, which loads the Kernel, which loads systemd as PID 1.
During the login process, I am prompted to allow a text message to be sent that contains a pin code. It is a randomly generated number that expires at a preset time. This pin number is an example of?
A one-time password, or OTP
Which command is used to view the logs collected by systemd?
journalctl
This is the command that is used to read the systemd logs, also called the systemd journal.
What is a “kernel panic”?
It is a fatal error that cannot be recovered from
This normally precedes a reboot, and the panic is discovered in the log files after the event has occurred.
The encrypted passwords for users on the system are located in what file?
/etc/shadow
This command is used to add users to the system.
useradd
What is the command that is used to create an initramfs image?
dracut
This command can be used to create the initramfs image.
In system logging via rsyslog, what is the purpose of a third-party agent?
It converts the native logging format to one that can be read on the rsyslog server.
In multi-factor authentication, what is meant by the term “biometrics”?
This is a physical characteristic that is unique to an individual, such as a fingerprint.
This could also include palm print, and voice or facial recognition.
Explain the difference between authentication and authorization.
Authentication verifies who you are, authorization verifies what you are allowed to do.
Which command is used to add a module to the kernel?
modprobe
What is the purpose of the umask value?
It is subtracted from the default permissions to determine the initial permissions for newly added file system objects.
In the /etc/sudoers file, what is the difference between wheel and %wheel?
wheel is a user and %wheel is a group.
The % denotes a group in the /etc/sudoers file, and the difference between these is that wheel is a user and %wheel is a group.
What are SHA and MD5 hashes used for, with regards to archives and files?
They are used to ensure that a file has not changed.
When the archive is taken, a file hash is calculated and then stored with the archive. This ensures that when the archive is unpacked, the hash can be checked to ensure that the files have not changed.
What is an IP set?
This is a group of IP addresses whose label is used to reference the group in firewall rules.
A junior administrator has installed an Apache web server on one of your RHEL instances. The administrator cannot get the Apache instance to log errors. You check into the issue and run ausearch with the following result: type=AVC msg=audit(1455805464.059:137): avc: denied { append } for pid=3128 comm=”httpd” name=”error_log” dev=”sdb1” ino=31221 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=0 What is the most likely cause?
There is a type mismatch on the source and target contexts. The target context is most likely the issue, since it is not in the httpd_ t context
This is probably what is happening here. We could run sealert to be sure, but most likely the type mismatch is the issue.
When a service starts and it binds to a port, where is this port binding information located?
/etc/services
What is the purpose of a pseudoterminal?
The pseudoterminal is terminal emulation that is provided to programs.
The pseudoterminal provides programs with a terminal. To the program, it appears like it is an actual terminal
Which of the following are archive and restore utilities? Select three.
dd is an archive and restore utility
cpio is an archive and restore utility
the tape archive utility (tar) is used for archiving and restoring.
What is the purpose of the sticky bit?
The sticky bit prevents anyone but the owner or root from renaming or deleting the file.
When connecting to a computer via a secure shell, where is the fingerprint stored so that it can be referenced to ensure that the remote machine is not an impersonator?
~/.ssh/known_hosts
Once the fingerprint of a remote machine has been accepted the first time, the fingerprint is added to the ~/.ssh/known_hosts file so that it can be compared in the future, to ensure the connection is to the intended machine.
What is located in the directory /etc/cups/?
This is the location of the configuration files for the printing subsystem that are set using the interface located at http://localhost:631
With respect to PAM configuration files, how does something that’s labeled requisite affect the execution of that module?
If the module returns a failure code, no other modules are run and the operation exits immediately.
This is the action induced by the requisite label.
____ is the default context-based permissions scheme that is used on Debian and SUSE based distributions.
Apparmor is the default context-based permissions scheme for Debian and SUSE distributions.
What is accomplished by the command chown user examplefile?
This command as written will change the owner of the examplefile to user.
What is the difference between an incremental backup and a differential backup?
Differential backups save changes since the last full backup, and incremental backups save changes since the last incremental backup.
What type of certificate in a PKI does not require a CA, but requires a direct trust between the client and the entity offering the certificate?
Self-signed certificate
What is displayed when we run the ls -Z command?
It shows the SELinux realted information about the files in the current directory.
What command would be used to configure the network interfaces via from the command line.
nmcli
The network manager cli is the command to configure network interfaces from the command line.
Which of the following are file compression utilities?
xz
bzip2
gzip
What is the term for a sever that provides trusted certificates to hosts and clients to guarantee that the system a user connects to is a trusted system and that the network communications between client and server are encrypted
Certificate Authority or CA server
Which process has a higher priority a process with a nice value of -5 or a process with a nice value of 7?
the process with the -5 is the higher priority
The lower the number the higher the priority
What information is displayed by issuing the free command?
The memory usage on the system, both free memory and memory in use
Which of the following services would be run by an authentication server?
Kerberos
Open LDAP
Active Directory
What command would be used to determine if a file is immutable?
lsattr
Which of the following are I/O schedulers?
thumb_up
thumb_down
Deadline
CFQ–Short for Completely Fair Queuing, this is an I/O scheduler.
NOOP
On a system with four CPUs, what percentage of total CPU is being used with a load average of 1.00?
The load average is divided among the CPUs. In this case only one of the CPUs is being loaded to 100% and so the actual CPU usage is 25%.
What is the purpose of the command lsof?
It lists all of the open files on a system.
lsof is short for “List Open Files.” It displays a listing of the files that are open, and what process has a handle to each one
What is the purpose of a load balancer?
It is placed in front of servers to allow them to be used together, and provides fault tolerance in the event one of the servers goes offline.
Please review the following and determine which command produced this output.
1 192.168.1.1 (192.168.1.1) 3.745 ms 1.343 ms 0.904 ms
2 conrtxxahre-lo100-primary.consolidated.net (207.70.185.241) 4.691 ms 3.519 ms 3.099 ms
3 conrtxxahrp-p-9k-te0-2-0-6.consolidated.net (207.70.186.217) 5.173 ms
conrtxxahr7-te3-1.consolidated.net (207.70.185.38) 4.991 ms 5.706 ms
4 katytxxchrm-207-70-186-64.consolidated.net (207.70.186.64) 4.904 ms 4.653 ms 5.424 ms
5 katytxxchrp-bdr-207-70-186-101.consolidated.net (207.70.186.101) 4.599 ms 8.290 ms 4.716 ms
6 100ge2-2.core1.hou1.he.net (184.105.255.17) 6.067 ms 10.672 ms 21.951 ms
7 100ge11-2.core1.dal1.he.net (184.105.213.53) 15.290 ms 10.797 ms 22.188 ms
8 eqix-da1.google.com (206.223.118.137) 14.411 ms 21.096 ms 13.423 ms
9 108.170.252.161 (108.170.252.161) 13.997 ms 22.789 ms
108.170.252.129 (108.170.252.129) 12.843 ms
10 108.170.231.75 (108.170.231.75) 11.216 ms 26.512 ms
108.170.231.73 (108.170.231.73) 12.820 ms
11 dfw28s01-in-f14.1e100.net (172.217.2.238) 18.265 ms 12.493 ms 13.193 ms
traceroute
With no additional arguments, what does the command ps display?
It shows the processes that have the same user ID as my current user ID.
___ is a command the runs traceroute every few seconds, to give an updated trace to a given target
mtr is a conbination of ping and traceroute, and updates the ping for each hop every few seconds
What is a whois lookup?
This is a search for the IANA registration for a domain, it provides contact information for the domain administrator
This searches the domain registrar for the contact information for the domain registrant
What is the difference between df and du?
df, or disk free, shows the free space on a disk. du lists the files and their size on the disk.
What is the purpose of a file server.
Provide client systems access to remote files and folders on centralized servers
By default, on a system that uses a BIOS, how do you access the GRUB boot options menu?
Once the system post has completed, and before the OS loads, hold down the shift key.
Which of the following are reasons to use a source code management solution?
To enable multiple developers to work on code at the same time.
To be able to revert code in the event of an issue.
To be able to track changes, knowing who made the change and for what reason.
In the following code example what will be the output? i='1' while [ $i -lt 5 ] do echo $i i=$(expr $i + 1) done
1, 2, 3, and 4
The evaluation expression indicates to print each i that is less than (-lt) 5
In a Bash script what is the purpose of the fi keyword?
It indicates the end of an if block.
It is the word if in reverse.
When merging branches using the merge command, which branch is the command run from?
The git merge command is run from the destination branch. The name of the branch that is being merged into the destination branch is provided in the command.
What is the keyword esac used for?
esac indicates the end of a case statement, and is the word case in reverse
The process that determines which automation tasks are executed in which order is called?
Orchestration
Once the following code is run, what will be the contents of the output file? for i in {1..5} do echo $i >> output done
It will contain the numbers 1 2 3 4, and 5
The double»_space; this means that $i gets appended to the file in each loop.
Files that are not meant to be tracked in a Git repository can be excluded by?
Adding the file names to the .gitignore file.
Fill in the blank. ‘ < > | ‘ are referred to as _
These are called meta characters, and they’re used for redirection.
What is the purpose of the $PATH variable?
It is a list of locations that are searched for executable files.
What is meant by “sourcing” a script?
This is using the source directive to include an external script file in the current script so that its variables and functions can be referenced.
Much like include in PHP, or import in Python, the source directive includes the contents of another script into the current script.
Which of the following are reasons to use configuration management?
One reason to use configuration mangement is the ability it provides for monitoring things.
Patch management
Inventory management, things like keeping track of settings on different servers (we have ten Windows machines, twelve Linux machines, and three Macs, for example, with this particular group of settings) would be a good reason to use configuration management.
While you are navigating the file system, you are in /usr/lib64 and you see that there are files located here that end with the extension .so What types of files are these?
These are dynamic shared library files. The so extension stands for shared object.
What are three reasons that it is important to set the time and date correctly on a Linux system?
It is crucial that the times match for authentication mechanisms, such as Kerberos
This ensures that scheduled tasks (cron jobs) are executing at the intended time.
It ensures that system logs have the correct time stamps.
MBR is an older drive partitioning structure, what has replaced MBR?
GPT
____ is the default packaging type that is used on RedHat-based Linux distributions.
RPM is used on RedHat-based distros
What is an inode?
An inode contains information about the file or folder, such as ownership and permissions.
During the boot process a boot loader is used. What is a boot loader?
The boot loader is a small program that loads the kernel from storage into memory
Why is it a good idea to move services off of their default port on production machines that are connected to the internet?
This prevents possible attackers from checking the known ports to see if a service is running on the system.
What is accomplished by the command:
usermod -a -G wheel example
The command will append (-a) the indicated group (-G wheel) to the groups that the user, in this case example, is a member of
A junior administrator in your organization has written a Bash script named logparse.sh, and has saved the file on the system. The junior admin is not able to remember where the file was saved, and is now concerned that there might be an issue with the disks as the result of running locate logparse.sh is empty. What is the most likely solution to the issue?
The command updatedb needs to be run from an authorized account so that the new file is entered into the locate database
Which of the following are part of a Firewall ACL (Access Control List)?
Source
Protocol
Destination
Which command should be used to edit the sudoers file?
Only visudo should be used to edit the sudoers file. This validates the file before saving, so that privileges are not broken irreparably.
Which of the following are firewall configuration tools?
UFW–The Uncomplicated FireWall is a firewall configuration tool.
iptables
firewalld
What is the difference between a standard user and a service user?
Standard users have login shells, while service users are only to be used for services. They do not have login shells.
This can be seen in /etc/passwd. The entries with /bin/nologin are usually service accounts.
What is the difference between a privileged and a non-privileged port?
Running services on privileged ports requires root privileges.
Yes, privileged ports (ports below 1023) require elevated privileges in order to run services on them.
Which of the following commands will generate SSH keys for use when connecting to a computer via SSH?
ssh_keygen
Which of the following is the best definition of Kerberos?
It is a time-based token issuing system that allows Single Sign On.
What is meant by a chroot jail?
This is a technique which changes the effective root of the file system for a process or user so that the user or process can not traverse the directory tree above the new effective root.
What is a zombie process?
This is a process whose parent process has exited, and the process is complete but it is still listed in the process table
When installing a new CUPS print server, you are attempting to access the management console from the server itself, what is the correct URI?
Localhost:631 or 127.0.0.1:631
What is the command used to switch to or create a branch in a Git repository?
git checkout
When combined with the -b switch it creates the branch name indicated
Why should a shell script begin with a #! statement, such as #!/bin/bash/ ?
It tells the system which interpreter to use for running the script.
How are files tracked, to ensure that They have not changed on disk?
The files are hashed, and those hashes are compared against known good values.
What is an ARP packet?
Address Resolution Protocol (ARP)
This is a packet that is used to resolve local network addresses.
In the following for loop, what will be the contents of the output file be? for i in {1..5} do echo $i > output done
The single > means write to the file, and each time through the for loop it will overwrite the file’s contents. In the end, the file will only contain the last number, 5.
What is the term for an individual step in an infrastructure automation process?
Procedure
Once a set of procedures has been identified, what is the term for executing the procedures in a logical order?
Automation