LinuxAcademy Practice Test Flashcards

1
Q

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?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is contained in the /etc/fstab file?

A
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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.

A

fsck cannot run on mounted drives, and it is necessary to unmount the drive prior to running the command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In the nmcli tool, what is meant by dev and what is meant by con?

A

nmcli dev refers to devices and their configuration.

nmcli con refers to the connections that are configured on the devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of the ldd command?

A

ldd prints the shared objects (shared libraries) required by each program or shared object specified on the command line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is located in the /var directory?

A

Log files are one of the things that are located in /var

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the name of the process that directs the system to boot from an image file rather than the first bootable media?

A

This is the name of the process that directs a system to boot from an image file. Usually this is an ISO file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Fill in the blank:

_ is the default package tool used on Debian-based systems.

A

The Advanced Package Tool (APT) is the default package manager for Debian-based systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the output of the following command?

timedatectl

A

This command with no switches will output the settings for the date and time on the system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The temporary file system that is loaded at boot is called?

A

initrd or initial ramdisk / initial file system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the name of the boot process that allows a client to mount a network share as its root file system?

A

Boot from NFS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which of the following are ‘pseudo’ file systems?

A

/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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the result of running the following command?

localectl list-locales

A

It will list all of the available languages and encoding settings that are available on the system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is network bonding?

A

This process it allows you to create redundant network interfaces, so that if one fails the others can carry the traffic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the purpose of the /etc/hosts file?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the command that is used to create a file system on a disk?

A

mkfs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the output of the ifconfig command when it is run with no arguments?

A

With no arguments, this command prints the current configuration of the network interfaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What command would I use to understand how much free space I have left on my filesystem?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

On modern systems, the Basic Input Output System (BIOS) has been replaced by what technology?

A

The Unified Extensible Firmware Interface replaced the older BIOS system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the purpose of rotating the log files?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Fill in the blank. __ is an improved version of the grand unified bootloader

A

GRUB2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

In networked systems, what is the name of the protocol used to dynamically assign IP addresses to network interfaces?

A

The Dynamic Host Configuration Protocol is used to assign addresses dynamically to network interfaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

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?

A

The command updatedb needs to be run from an authorized account so that the new file is entered into the locate database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which of the following is a Linux desktop environment?

A

KDE
GNOME
XFCE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Fill in the blanks: ___ ____ extend the functionality of the kernel.

A

Modules extend a kernel’s functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is the purpose of the | operator in Bash?

A

This is the ‘pipe’ operator. It redirects the stdout from the left into the stdin on the right.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Which of the following commands will search for the file examaple.sh in the current directory, recursively?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Which of the following are a part of MFA (Multi-Factor Authentication)? Select three

A

Something you are, such as a fingerprint
Something you know, such as a password
Something you have, such as a token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Which of the following are text editors?

A

vi
nano
vim

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What can be done to secure the bootloader so that it is not possible to simply enter single user mode from the prompt?

A

Apply a bootloader password.

This prevents people, who have physical access to the terminal, from subverting the bootloader process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Which of the following are a best practice for a secure system? (Select three)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

When issuing the userdel command, what is the function of the -r flag?

A

This will remove the user’s home directory in addition to removing the users account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Which boot process is in the most correct order?

A

UEFI / GRUB2 / Kernel / systemd

This is the correct order: UEFI calls the bootloader, which loads the Kernel, which loads systemd as PID 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

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

A one-time password, or OTP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Which command is used to view the logs collected by systemd?

A

journalctl

This is the command that is used to read the systemd logs, also called the systemd journal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What is a “kernel panic”?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

The encrypted passwords for users on the system are located in what file?

A

/etc/shadow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

This command is used to add users to the system.

A

useradd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

What is the command that is used to create an initramfs image?

A

dracut

This command can be used to create the initramfs image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

In system logging via rsyslog, what is the purpose of a third-party agent?

A

It converts the native logging format to one that can be read on the rsyslog server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

In multi-factor authentication, what is meant by the term “biometrics”?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Explain the difference between authentication and authorization.

A

Authentication verifies who you are, authorization verifies what you are allowed to do.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

Which command is used to add a module to the kernel?

A

modprobe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

What is the purpose of the umask value?

A

It is subtracted from the default permissions to determine the initial permissions for newly added file system objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

In the /etc/sudoers file, what is the difference between wheel and %wheel?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

What are SHA and MD5 hashes used for, with regards to archives and files?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

What is an IP set?

A

This is a group of IP addresses whose label is used to reference the group in firewall rules.

48
Q

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?

A

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.

49
Q

When a service starts and it binds to a port, where is this port binding information located?

A

/etc/services

50
Q

What is the purpose of a pseudoterminal?

A

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

51
Q

Which of the following are archive and restore utilities? Select three.

A

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.

52
Q

What is the purpose of the sticky bit?

A

The sticky bit prevents anyone but the owner or root from renaming or deleting the file.

53
Q

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?

A

~/.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.

54
Q

What is located in the directory /etc/cups/?

A

This is the location of the configuration files for the printing subsystem that are set using the interface located at http://localhost:631

55
Q

With respect to PAM configuration files, how does something that’s labeled requisite affect the execution of that module?

A

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.

56
Q

____ is the default context-based permissions scheme that is used on Debian and SUSE based distributions.

A

Apparmor is the default context-based permissions scheme for Debian and SUSE distributions.

57
Q

What is accomplished by the command chown user examplefile?

A

This command as written will change the owner of the examplefile to user.

58
Q

What is the difference between an incremental backup and a differential backup?

A

Differential backups save changes since the last full backup, and incremental backups save changes since the last incremental backup.

59
Q

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?

A

Self-signed certificate

60
Q

What is displayed when we run the ls -Z command?

A

It shows the SELinux realted information about the files in the current directory.

61
Q

What command would be used to configure the network interfaces via from the command line.

A

nmcli

The network manager cli is the command to configure network interfaces from the command line.

62
Q

Which of the following are file compression utilities?

A

xz
bzip2
gzip

63
Q

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

A

Certificate Authority or CA server

64
Q

Which process has a higher priority a process with a nice value of -5 or a process with a nice value of 7?

A

the process with the -5 is the higher priority

The lower the number the higher the priority

65
Q

What information is displayed by issuing the free command?

A

The memory usage on the system, both free memory and memory in use

66
Q

Which of the following services would be run by an authentication server?

A

Kerberos
Open LDAP
Active Directory

67
Q

What command would be used to determine if a file is immutable?

A

lsattr

68
Q

Which of the following are I/O schedulers?

thumb_up

thumb_down

A

Deadline

CFQ–Short for Completely Fair Queuing, this is an I/O scheduler.

NOOP

69
Q

On a system with four CPUs, what percentage of total CPU is being used with a load average of 1.00?

A

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%.

70
Q

What is the purpose of the command lsof?

A

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

71
Q

What is the purpose of a load balancer?

A

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.

72
Q

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

A

traceroute

73
Q

With no additional arguments, what does the command ps display?

A

It shows the processes that have the same user ID as my current user ID.

74
Q

___ is a command the runs traceroute every few seconds, to give an updated trace to a given target

A

mtr is a conbination of ping and traceroute, and updates the ping for each hop every few seconds

75
Q

What is a whois lookup?

A

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

76
Q

What is the difference between df and du?

A

df, or disk free, shows the free space on a disk. du lists the files and their size on the disk.

77
Q

What is the purpose of a file server.

A

Provide client systems access to remote files and folders on centralized servers

78
Q

By default, on a system that uses a BIOS, how do you access the GRUB boot options menu?

A

Once the system post has completed, and before the OS loads, hold down the shift key.

79
Q

Which of the following are reasons to use a source code management solution?

A

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.

80
Q
In the following code example what will be the output?
i='1'
while [ $i -lt 5 ]
do
echo $i
i=$(expr $i + 1)
done
A

1, 2, 3, and 4

The evaluation expression indicates to print each i that is less than (-lt) 5

81
Q

In a Bash script what is the purpose of the fi keyword?

A

It indicates the end of an if block.

It is the word if in reverse.

82
Q

When merging branches using the merge command, which branch is the command run from?

A

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.

83
Q

What is the keyword esac used for?

A

esac indicates the end of a case statement, and is the word case in reverse

84
Q

The process that determines which automation tasks are executed in which order is called?

A

Orchestration

85
Q
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
A

It will contain the numbers 1 2 3 4, and 5

The double&raquo_space; this means that $i gets appended to the file in each loop.

86
Q

Files that are not meant to be tracked in a Git repository can be excluded by?

A

Adding the file names to the .gitignore file.

87
Q

Fill in the blank. ‘ < > | ‘ are referred to as _

A

These are called meta characters, and they’re used for redirection.

88
Q

What is the purpose of the $PATH variable?

A

It is a list of locations that are searched for executable files.

89
Q

What is meant by “sourcing” a script?

A

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.

90
Q

Which of the following are reasons to use configuration management?

A

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.

91
Q

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?

A

These are dynamic shared library files. The so extension stands for shared object.

92
Q

What are three reasons that it is important to set the time and date correctly on a Linux system?

A

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.

93
Q

MBR is an older drive partitioning structure, what has replaced MBR?

A

GPT

94
Q

____ is the default packaging type that is used on RedHat-based Linux distributions.

A

RPM is used on RedHat-based distros

95
Q

What is an inode?

A

An inode contains information about the file or folder, such as ownership and permissions.

96
Q

During the boot process a boot loader is used. What is a boot loader?

A

The boot loader is a small program that loads the kernel from storage into memory

97
Q

Why is it a good idea to move services off of their default port on production machines that are connected to the internet?

A

This prevents possible attackers from checking the known ports to see if a service is running on the system.

98
Q

What is accomplished by the command:

usermod -a -G wheel example

A

The command will append (-a) the indicated group (-G wheel) to the groups that the user, in this case example, is a member of

99
Q

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?

A

The command updatedb needs to be run from an authorized account so that the new file is entered into the locate database

100
Q

Which of the following are part of a Firewall ACL (Access Control List)?

A

Source
Protocol
Destination

101
Q

Which command should be used to edit the sudoers file?

A

Only visudo should be used to edit the sudoers file. This validates the file before saving, so that privileges are not broken irreparably.

102
Q

Which of the following are firewall configuration tools?

A

UFW–The Uncomplicated FireWall is a firewall configuration tool.

iptables

firewalld

103
Q

What is the difference between a standard user and a service user?

A

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.

104
Q

What is the difference between a privileged and a non-privileged port?

A

Running services on privileged ports requires root privileges.

Yes, privileged ports (ports below 1023) require elevated privileges in order to run services on them.

105
Q

Which of the following commands will generate SSH keys for use when connecting to a computer via SSH?

A

ssh_keygen

106
Q

Which of the following is the best definition of Kerberos?

A

It is a time-based token issuing system that allows Single Sign On.

107
Q

What is meant by a chroot jail?

A

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.

108
Q

What is a zombie process?

A

This is a process whose parent process has exited, and the process is complete but it is still listed in the process table

109
Q

When installing a new CUPS print server, you are attempting to access the management console from the server itself, what is the correct URI?

A

Localhost:631 or 127.0.0.1:631

110
Q

What is the command used to switch to or create a branch in a Git repository?

A

git checkout

When combined with the -b switch it creates the branch name indicated

111
Q

Why should a shell script begin with a #! statement, such as #!/bin/bash/ ?

A

It tells the system which interpreter to use for running the script.

112
Q

How are files tracked, to ensure that They have not changed on disk?

A

The files are hashed, and those hashes are compared against known good values.

113
Q

What is an ARP packet?

A

Address Resolution Protocol (ARP)

This is a packet that is used to resolve local network addresses.

114
Q
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
A

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.

115
Q

What is the term for an individual step in an infrastructure automation process?

A

Procedure

116
Q

Once a set of procedures has been identified, what is the term for executing the procedures in a logical order?

A

Automation