General CompTIA Linux+ Questions Flashcards

This is a bunch of questions that cover a lot of knowledge I expect to be on the CompTIA Linux+ exam.

1
Q

What order are the Bash shell config files introduced upon login? (Pgs. 83-84)

A

/etc/profile, ~/.bash_profile, ~/.bashrc, /etc/bashrc

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

What do each of the Bash config files generally do? (Pgs. 83-84)

A

/etc/profile – Sets main environment variables. HOSTNAME, MAIL, etc.
~/.bash_profile – Sets user-defined environment variables. Also, EDITOR, PATH, etc.
~/.bashrc – Sets user-defined runtime variables and aliases.
/etc/bashrc – Sets main runtime variables. SHELL, PS1 (Command Prompt configuration), etc.

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

How would you set the date on a Linux system?

A

Example: timedatectl set-time 2023-01-01

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

What are the four attributes for a file/directory in ls -Z per SELinux? (Pg. 558)

A

user (_u), role (_r), type (_t), sensitivity level (s0)

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

How do you add a secondary group without deleting any groups present with usermod? (Pg. 110)

A

usermod -aG <group_name> -- (-aG) Adds a secondary group (without replacing original(s).</group_name>

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

How do you change a username with usermod? (Pg. 110)

A

usermod -l <new_user_name><old_user_name> -- (-l) Renames the username (a.k.a., login name) for a user.</old_user_name></new_user_name>

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

And how do you rename a user and move their home directory to a new user with usermod? (Pg. 110)

A

usermod -l <new_user_name> -d <original_home_dir> -m <old_user_name> -- (-m) Moves the user's home directory to being a new user's home directory.</old_user_name></original_home_dir></new_user_name>

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

What is Samba (Pgs. 472-473)?

A

Samba is a remote access tool to Windows file and print services for Linux.

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

What does OOM stand for? (Pg. 612)

A

“Out Of Memory Killer”

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

What does the OOM process generally do? (Pg. 612)

A

When memory is critically low for a system, the OOM process kills processes with high memory utilization. The processes to be killed are chosen based on a severity score for memory utilization determined by OOM, where the highest severity score is killed. Core system processes are given low severity scores.

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

What does lsof mean? (Pg. 228)

A

“lsof” = “LiSt Open Files”

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

What flag do you need for lsof to check open network ports? (Pg. 503)

A

lsof -i – This will list network services and their ports.

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

What does pwconv generally do?

A

pwconv – This command converts the /etc/passwd file to a /etc/shadow file.

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

How do you create and decrypt an encrypted cpio file? (Pg. 233)

A

cpio -ov > [output dump file name] – Creates an encrypted dump (usually piped onto a command defines the file).
cpio -iv < [input dump file name] – Decrypts the encrypted dump.

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

What does mtr stand for? (Pg. 466)

A

“mtr” = “My TraceRoute”

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

Which two commands does mtr copy and combine in functionality? (Pg. 466)

A

It combines traceroute and ping, scanning the network path a packet takes and checking packet transmission to an external server.

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

How many properties are there in /etc/shadow? (Pgs. 102-103)

A

There are 8 properties.

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

What are the properties of /etc/shadow? (Pgs. 102-103)

A

user_name, password, last_modified, min_days, max_days, warn_days, inactive (measured in days), expire

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

Why might a user not be able to save their work on a filesystem?

A

The filesystem was mounted in read-only mode. Example: mount -o ro /public
To undo: mount -o remount,rw /public

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

Blacklisting the module disables the module, but how do you prevent a module from being installed?

A

Do this: echo “blacklist joydev”&raquo_space; /etc/modprobe.d/blacklist.conf – Blacklists the module.
And this: echo “blacklist joydev”&raquo_space; /etc/modprobe.d/network.conf – Blacklists the module in the network config.
BUT ALSO: echo “install joydev /bin/false”&raquo_space; /etc/modprobe.d/blacklist.conf – Prevents the module from being installed.

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

How are RADIUS and TACACS+ used, simply?

A

RADIUS and TACACS+ use a modem to proxy to a separate server to authenticate a user. TACACS+ furthers RADIUS by incorporating password encryption.

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

How do you determine the IP address subnet mask from the CIDR number?

A

Each number of an IP address is an octet of binary digits. Mark a ‘1’ from the left going right for the CIDR number of spaces to determine the subnet address. For instance a subnet:
/22 = 11111111.11111111.11111100.00000000 = 255.255.252.0

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

How do you display all addresses with the ip command? (Pgs. 450-451)

A

ip addr show – Displays all network interface addresses.

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

How do you add an address to a device with the ip command? (Pgs. 450-451)

A

ip addr add <network_address> dev <interface> -- Adds an address to a device.</interface></network_address>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
How do you delete an address with the ip command? (Pgs. 450-451)
ip addr del dev -- Deletes an address from a device.
26
How do you add a route with the ip command? (Pg. 457)
ip route add via dev -- Adds a network route.
27
What do the BOOTPROTO, IPADDR, NETMASK, and BROADCAST attributes of a /etc/sysconfig/network-scripts interface file specify? (Pg. 452)
BOOTPROTO -- Specifies whether the network interface has a static or dynamic (DHCP) addressing scheme. IPADDR -- Specifies the base address for a network interface. NETMASK -- Specifies the network mask for a network interface. BROADCAST -- Specifies the broadcast address for a network interface.
28
What do /etc/nsswitch.conf and /etc/resolv.conf each do? (Pg. 459)
/etc/nsswitch.conf -- (Name Service Switch) The file designates the order in which name servers will be used to search for name resolution. It also defines which name servers to use for specific service types. /etc/resolv.conf -- The file resolves the hostnames of name servers to their IP addresses.
29
What does PAM stand for? (Pgs. 536-537)
"PAM" = "Pluggable Authentication Modules"
30
What is the PAM configuration directory? (Pgs. 536-537)
/etc/pam.d
31
What are the three columns of a PAM config file? (Pgs. 536-537)
Authentication Tasks, Control Keyword, Module (.so)
32
What are the main PAM authentication tasks? (Pgs. 536-537)
List of Authentication Tasks: account -- Requests account verification services (e.g., whether password has expired). auth -- Authenticates a user, request a password, and set up credentials. password -- User must insert a password. session -- Designates settings for a service session.
33
What are the main PAM control keywords? (Pgs. 536-537)
List of Control Keywords: required -- If fails, operation fails after running through all other modules. requisite -- If fails, operation fails immediately. sufficient -- If succeeds, that is enough for the operation to succeed. optional -- If fails, operation is okay, unless it is the only module in the stack.
34
How do you change your password with the passwd command? (Pgs. 108-109)
passwd -- Brings up dialog to change password.
35
How do you lock an account with the passwd command? (Pgs. 108-109)
passwd -l -- Locks user account.
36
How do you set minimum days with the passwd command? (Pgs. 108-109)
passwd -n <#> -- Sets the minimum number of days before password change.
37
How do you set maximum days with the passwd command? (Pgs. 108-109)
passwd -x <#> -- Sets the maximum number of days before password expiration.
38
How do you set warn days with the passwd command? (Pgs. 108-109)
passwd -w <#> -- Sets the number of warn days before password expiration.
39
How do you set inactive days for password expiration with the passwd command? (Pgs. 108-109)
passwd -i <#> -- Sets the number of days account is accessible after password expiration.
40
What are the two main config files for GRUB? (Pg. 336)
/etc/default/grub (default variables for configuring GRUB2) and /boot/grub2/grub.cfg (GRUB2's main config file)
41
In /etc/default/grub, what are GRUB_TIMEOUT and GRUB_DEFAULT? (Pg. 336)
Variables in /etc/default/grub: GRUB_TIMEOUT -- The time (in seconds) allowed before GRUB selects the default OS to boot. GRUB_DEFAULT -- The default OS to boot for a system.
42
How do you see the boot messages using journalctl? (Pgs. 550-551)
journalctl -b <#> -- Lists the boot messages from the # boot for the system. Positive number is the first nth boot of Linux. Negative number is the last nth boot of Linux. (Negative is probably more useful.)
43
How do you see logs for a specific service using journalctl? (Pgs. 550-551)
journalctl -u -- Lists the journal log messages for the specified service.
44
What are the two components of a Git config for a repository, of which are required for a commit? (Pg. 579)
user.name and user.email
45
How do you initiate the emergency target with systemctl?
systemctl emergency
46
How do you add or delete a route with the route command? (Pgs. 456-457)
route add -net netmask gw -- Add a gateway route. route del -net netmask gw -- Delete a gateway route.
47
How do you add a default gateway with the route command? (Pgs. 456-457)
route add default gw -- Adds a default gateway.
48
What does netstat show and what are its main arguments? (Pg. 464)
Lists network connections (-a for all), routing table (-r), and network interface information (-i).
49
What command is supposed to replace the netstat command? (Pg. 464)
"ss" = "Secure Sockets"
50
How do you add the immutability attribute to a file with the chattr command? (Pg. 175)
chattr +i -- Adds immutable attribute.
51
How do you add the file compression attribute to a file with the chattr command? (Pg. 175)
chattr +c -- Adds compressed attribute.
52
How do you add the journaling attribute with the chattr command? (Pg. 175)
chattr +j -- Adds data journaling attribute.
53
How do you add the synchronous updates attributes with the chattr command? (Pg. 175)
chattr +s -- Adds synchronous updates attribute.
54
Who can delete a file with an immutable attribute set (done by chattr)? (Pg. 175)
No one can delete the file. You would have to do a chattr -i to remove the immutability.
55
What is Upstart, in simple terms?
An alternative initialization system (versus init) that allows for asynchronous initialization of processes, rather than the traditional, forced synchronous order.
56
How many fields are there in /etc/fstab? (Pg. 205)
There are 6 fields.
57
What are the fields of /etc/fstab? (Pg. 205)
device/partition, directory mount point, filesystem type, mount options, filesystem should be backed up with dump?, order of fsck on reboot
58
What order number should the root partition (/) have in the /etc/fstab table? (Pg. 205)
Root should have an order number of 1.
59
What is the order number for non-root, non-swap partitions in the /etc/fstab table? (Pg. 205)
Other partitions should have an order number of 2. (Swap partitions can be a 0.)
60
What are distinguishing features for: ext3, ext4, xfs, btrfs, reiserfs, nfs, ntfs? (Pg. 198)
ext3 -- Common journaled filesystem. ext4 -- Common journaled filesystem with support for larger volumes and files than ext3. xfs -- Journaled filesystem that uses parallel I/O. btrfs -- Journaled filesystem and default filesystem for SUSE. reiserfs -- Journaled filesystem. Predecessor to btrfs. nfs -- Allows filesystem access over a network. (NOT JOURNALED!) ntfs -- Journaled filesystem related to Microsoft. Microsoft's New Technology File System (NTFS).
61
How do you define the type of filesystem with mkfs? (Pg. 198)
mkfs -t OR mkfs. -- This will mount a specified filesystem to a partition.
62
How do you add a journaling filesystem with mke2fs?
mke2fs -j -- Adds a journaling filesystem to a partition.
63
How do you add a label with tune2fs? (Pgs. 199-200)
tune2fs -L
64
How do you add a journaling filesystem to ext2 with tune2fs? (Pg. 200)
tune2fs -j -- Adds a journaling filesystem to a partition.
65
How do you delete a user's record just from /etc/passwd and /etc/shadow with the userdel command? (Pg. 110)
userdel -- This deletes the specified userid, just removing their /etc/passwd and /etc/shadow entries.
66
How do you fully delete a user, with their home directory, jobs, and mail, with the userdel command? (Pg. 110)
userdel -r -- This wholly deletes the specified userid, removing their directory, jobs, and mail.
67
What are the main directory and config file for time zones and what do they each define? (Pg. 80)
Time Zone Config Files: /usr/share/zoneinfo Directory -- Contains a number of binary files with worldwide time zones. /etc/localtime -- From the /usr/share/zoneinfo, a file is set to this file to set the system's time zone.
68
What is an example of setting a local locale setting? (Pg. 78)
Example: localectl set-locale LANG=en_US.UTF-8 -- Sets the locale and keyboard settings to US English/UTF-8.
69
How do you display the current locale setting? (Pg. 78)
localectl status -- Lists the current locale setting on the Linux system.
70
How do you list out the available locale settings? (Pg. 78)
localectl list-locales -- Lists available locale settings.
71
What is the standard, full permission set for files? (Pg. 169)
0666 -- For a file, read and write permissions for user, group, and other.
72
What is the standard, full permission set for directories? (Pg. 169)
0777 -- For a directory, read, write, and execute permissions for user, group, and other.
73
What is the default umask? (Pgs. 170-171)
0022 -- The default umask is to remove the write permissions from group and other users.
74
How do you set the umask? (Pgs. 170-171)
Example: umask 0033 -- Removes write and execute permissions for files and directories for group and other users.
75
What does the command "df" show, in general? (Pgs. 207-208)
It shows the amount of disk space still free under the system's disk partitions.
76
What does "df" stand for? (Pgs. 207-208)
"df" = "Disk Free"
77
What argument of the df command prints the results in a readable format? (Pgs. 207-208)
df -h -- Human-readable format (an essential argument).
78
What argument of the df command prints the results by file type? (Pgs. 207-208)
df -T -- Displays filesystem type for each partition.
79
What argument of the df command prints the results by remaining inodes? (Pgs. 207-208)
df -i -- Displays remaining inodes for each partition.
80
What does the command "du" show, in general? (Pgs. 208-209)
It shows the amount of space used under a directory.
81
What does "du" stand for? (Pgs. 208-209)
"du" = "Directory Usage"
82
What argument of the du command prints the results in a readable format? (Pgs. 208-209)
du -h -- Human-readable format (an essential argument).
83
What argument of the du command prints the total usage of a directory? (Pgs. 208-209)
du -c -- Calculates the total disk space usage for a directory.
84
What argument of the du command prints the total usage summary (without subdirectory listing)? (Pgs. 208-209)
du -s -- Prints a summary of disk space usage for a directory. (Does not list total for subdirectories.)
85
What is mq-deadline? (Pgs. 210-211)
mq-deadline is a job scheduler which sorts I/O requests in batches. It is useful for virtualized guest users.
86
What is the config file for setting a scheduler? (Pgs. 210-211)
/sys/block/sda/queue/scheduler -- Defines the scheduler for a system ("sda" could be a different disk name).
87
What does "mdadm" stand for? (Pgs. 238-239)
"mdadm" = "Meta-Device ADMinistrator"
88
What is an example meta-device? (Pgs. 238-239)
/dev/md0 -- The first meta-device on a system.
89
What is an example of RAID disk creation with the mdadm command? (Pgs. 238-239)
mdadm -C /dev/md0 --level=1 --raid-disks=2 /dev/sdb /dev/sdc -- This creates a RAID Level 1 array out of two disks (/dev/sdb and /dev/sdc). The meta-device /dev/md0 is created out of this action.
90
How do you see the description of a RAID meta-device with the mdadm command? (Pgs. 238-239)
mdadm --detail -- Displays the details of the meta-device.
91
How do you make a RAID filesystem permanent? (Pgs. 238-239)
Add the meta-device filesystem to the filesystem table /etc/fstab.
92
What is virsh? (Pg. 591)
virsh is used to manage virtual machine hypervisors on Linux. This is specifically a Red Hat-based tool.
93
How do you list all available domains with virsh? (Found Online)
virsh list --all -- Lists all available VM domains.
94
How do you start up a VM with virsh? (Found Online)
Example: virsh start test -- Starts up the VM "test."
95
How do you shutdown a VM with virsh? (Found Online)
Example: virsh shutdown test -- Shuts down the VM "test."
96
How do you define an escape character sequence? (Pg. 49)
Example: virsh --escape ^[ -- Sets "^[" as the escape character sequence.
97
What is badblocks?
It is a command that allows you to search a device for bad storage blocks.
98
How do you find the current default zone with the firewall-cmd command? (Pgs. 507-508)
firewall-cmd --get-default-zone -- Displays the current default zone.
99
How do you set the default zone to a new zone with the firewall-cmd command? (Pgs. 507-508)
firewall-cmd --set-default-zone= -- Sets the current default zone to a specified zone.
100
How do you display the services accessible through a zone with the firewall-cmd command? (Pgs. 507-508)
firewall-cmd --list-all -- Displays all services and interfaces allowed through a zone.
101
How do you add and allow a service through a firewall with the firewall-cmd command? (Pgs. 507-508)
Example: firewall-cmd --add-service=http --zone=home -- Allows the HTTP service to pass through the "home" zone.
102
What firewall-cmd flag would you need to make a change to a firewall which keeps on reboot? (Pgs. 507-508)
firewall-cmd --permanent -- Applies a firewall change to be persistent, including on reboot.
103
What firewall-cmd flag would you need to make firewall settings immediately take effect? (Pgs. 507-508)
firewall-cmd --reload -- Reloads the firewall config to put it into effect.
104
What are the main chains of iptables?
FORWARD, INPUT, OUTPUT
105
What are the four filter table policies of iptables?
ACCEPT, DROP, QUEUE, REJECT
106
How do you list all rules with the iptables command?
iptables -L -- Lists all rules in iptables chain.
107
How do you delete a rule with the iptables command?
Example: iptables -D FORWARD 1 -- Deletes the first rule in the FORWARD chain.
108
How do you set a default policy with the iptables command?
Example: iptables -P INPUT DROP -- Specifies that the default policy for the INPUT chain is to DROP connections.
109
What is an example to disallow a protocol's traffic with the iptables command?
Example: iptables -A INPUT -s 0/0 -p icmp -j DROP -- Sets that ICMP traffic should be dropped from all IP addresses (0/0).
110
What is an example for allowing an IP address's traffic with the iptables command?
Example: iptables -A INPUT -i eth0 -s 192.168.2.0/24 -j ACCEPT -- Set that traffic from the 192.168.2.0 network on interface eth0 should be accepted.
111
How do you list all services with the chkconfig command? (Pg. 503)
chkconfig -l -- Lists all services.
112
How do you turn on a service with the chkconfig command? (Pg. 503)
Example: chkconfig auditd on -- Turns on the auditd daemon.
113
How do you turn on a service at specific levels with the chkconfig command? (Pg. 50)
Example: chkconfig --level 35 auditd on -- Turns on the auditd daemon at levels 3 and 5.
114
What does Anaconda do? (Pg. 602)
Anaconda is a Linux system installer for Red Hat systems.
115
How many fields of /etc/passwd are there? (Pgs. 101-102)
There are 7 properties.
116
What are the fields of /etc/passwd? (Pgs. 101-102)
user_name, password, UID, GID, comment/GECOS, home_directory, default_shell
117
How many of fields of crontab are there? (Pgs. 275-276)
There are 6 fields.
118
What are the fields of crontab? (Pgs. 275-276)
Minute, Hour, Day of Month, Month, Day of Week, Command
119
What is the main config file for crontab? (Pgs. 275-276)
/etc/crontab
120
What are the crontab file directories? (Pgs. 275-276)
/etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly, /etc/cron.monthly
121
What does the "nm" of "nmtui" and "nmcli" mean? (Pgs. 452-453)
"nm" = "NetworkManager"
122
What are nmtui and nmcli? (Pgs. 452-453)
They are used to manage network connections. The NMTUI tool is a Text User Interface, providing a graphical tool to change network settings. And the NMCLI tool is a Command Line Interface, providing a terminal interface for users to change network settings.
123
What are runlevels 0, 1, 3, 5, and 6? (Pgs. 342 and 348)
Rununit Runlevels: 0 -- Halt 1 -- Text-based Single-user Mode/Rescue Mode 3 -- Text-based Multi-user Mode 5 -- Graphical-based Multi-user Mode 6 -- Reboot
124
How do you set a runlevel with systemctl? (Pgs. 342 and 348)
Example: systemctl isolate runlevel5.target -- Sets the current runlevel to Runlevel 5.
125
How do you set a default runlevel with systemctl? (Pgs. 342 and 348)
Example: systemctl set-default runlevel5.target -- Sets the default runlevel to Runlevel 5.
126
What will be shown in /etc/shadow if a user account is locked? (Pg. 108)
There will be two exclamation points (!!) preceding the password field in /etc/shadow.
127
What is the numerical permission value for the SUID? (Pg. 171-172)
4 -- SUID (4000)
128
What is the numerical permission value for the SGID? (Pg. 171-172)
2 -- SGID (2000)
129
What is the numerical permission value for the Sticky Bit? (Pg. 171-172)
1 -- Sticky Bit (1000)
130
What is the port for FTP?
20 & 21 -- FTP
131
What is the port for SSH?
22 -- SSH
132
What is the port for Telnet?
23 -- Telnet
133
What is the port for SMTP?
25 -- SMTP
134
What is the port for DNS?
53 -- DNS
135
What is the port for HTTP?
80 -- HTTP
136
What is the port for POP3?
110 -- POP3
137
What is the port for NTP?
123 -- NTP
138
What is the port for LDAP?
389 -- LDAP
139
What is the port for HTTPS?
443 -- HTTPS
140
What does PXE generally do?
PXE is a utility which can remotely boot a Linux system, using that system's NIC connection.
141
What is Terraform, simply? (Pg. 577)
It is an IaC solution which provisions data centers using JSON. Think of Ansible, Chef, Puppet, etc.
142
What is shown with the w command? (Pgs. 540-541)
It lists all logged-in users and the processes they are running.
143
How many fields of ls -l are there? (Pg. 125)
There are 7 fields listed for each line of ls -l.
144
What are the fields of ls -l? (Pg. 125)
permissions, number of links, owner, group owner, file size (in bytes), modification date/time, filename
145
How is the awk command used, generally? (Pgs. 426-427)
It is used to print formatted text from a file, generally line-by-line with respect to columns.
146
What is the alternate command for awk? (Pgs. 426-427)
gawk
147
What is an example of printing column fields with the awk command? (Pgs. 426-427)
Example: ls -l | gawk '{ print $1,$9 }' -- This prints columns 1 and 9 from the output of ls -l.
148
What is an example of adding a divider when printing column fields with the awk command? (Pgs. 426-427)
Example: ls -l | gawk '{ print $1,"\t" $9 }' -- This takes columns 1 and 9 of the ls -l output and adds a tab between them.
149
What does "sed" mean? (Pgs. 422-423)
"sed" = "Stream EDitor"
150
What is the sed command generally used for? (Pgs. 422-423)
It edits the output stream of text in a specified manner.
151
How do you print without the pattern space with the sed command? (Pgs. 422-423)
sed -n -- This is an extremely important argument, which removes some of the extra lines from the output text.
152
What is an example of printing specific lines with the sed command? (Pgs. 422-423)
sed -n 3,+3p /etc/passwd -- This prints the line #3 and then three additional (+) lines after that in the file.
153
What is an example of searching and replacing pattern with the sed command? (Pgs. 422-423)
sed -n 's/root/fred/p' /etc/passwd -- This substitutes instances of "root" for "fred" in the /etc/passwd file.
154
What does the "tr" command mean? (Pg. 418)
"tr" = "TRanslate"
155
How do you delete a character in a file with the tr command? (Pg. 418)
tr -d -- This deletes all instances of the character set.
156
How do you replace characters in a file with the tr command? (Pg. 418)
tr -s -- This squeezes/replaces the old characters with the new characters.
157
How do you convert all lowercase characters to uppercase ones, for instance, with the tr command? (Pg. 418)
Example: grep root /etc/passwd | tr [a-z] [A-Z] -- This translates all of the characters in the file from lowercase to uppercase.
158
What is the primary element that the "cut" command handles from a file? (Pg. 419)
The "cut" tool is primarily designed to handle and extract columns from a file.
159
How do you specify numbered characters with the cut command? (Pg. 419)
Example: cut -c 1,3,5 -- This cuts out the first, third, and fifth characters from a file.
160
How do you specify delimiters with the cut command? (Pg. 419)
Example: cut -d " " -- This specifies the space character as a file's delimiter.
161
How do you specify numbered fields with the cut command? (Pg. 419)
Example: cut -d " " -f1,3 -- This extracts the first and third fields (columns) from a file.
162
What the "nl" command mean? (Pgs. 419-420)
"nl" = "Number Lines"
163
What does the nl command generally do? (Pgs. 419-420)
It adds line numbers to a file.
164
How do you add line numbers to all lines in a file (including blanks) with the nl command? (Pgs. 419-420)
nl -a -- This adds line numbers to all lines of a file, including blank lines.
165
What does the "od" command mean? (Pgs. 421-422)
"od" = "Octal Dump"
166
What does the od command generally do? (Pgs. 421-422)
It converts a file to a specific character set.
167
How do you convert a file to octal characters with the od command? (Pgs. 421-422)
od -b -- This converts the specified file to an octal dump.
168
What does the split command do? (Pg. 430)
It is used to split a file into smaller parts.
169
What the two main arguments of the split command? (Pg. 430)
-l and -b -- The "-l" divides a file by n-number of lines and "-b" by n-number of bytes.
170
What is the general format of the split command? (Pg. 430)
split <-l | -b> <#> -- This splits the input file by a specified number of lines or bytes and outputs the individual pieces into multiple files, each with output prefix in the front of it.
171
What is the uniq command used to do? (Pgs. 430-431)
It is used primarily to remove consecutive, duplicate lines from a file.
172
How do you print duplicate lines with the uniq command? (Pgs. 430-431)
Example: uniq -d lastnames -- This prints only the consecutive lines in the file "lastnames" that are duplicate.
173
How do you print without duplicates with the uniq command? (Pgs. 430-431)
Example: uniq -u lastnames -- This prints only the unique lines in the file "lastnames," omitting duplicates.
174
What do the commands netstat, nc, traceroute, and ping do, generally speaking? (Pgs. 462-467)
netstat gives network information, specifically network connections, the routing table, and interface info. ping tests whether a connection can be made with a server. nc goes a step beyond ping and attempts to connect to that server. traceroute displays the routing path of travel it takes to send packets to an external server.
175
What are the two main keywords in a resolv.conf file? (Pg. 459)
Keywords: - search -- This specifies the domain which should be used to fill out incomplete hostnames. - nameserver -- This defines the IP address of a DNS server.
176
What is the resolv.conf file's general format? (Pg. 459)
Example: search mydom.com -- This searches the address "mydom.com" address for completing incomplete hostnames. nameserver 8.8.8.8 -- This specifies the IP address 8.8.8.8 as a nameserver for the server.
177
What are the modes of SELinux? (Pg. 559)
Enforcing, Permissive, Disabled
178
What do the modes of SELinux each denote? (Pg. 559)
Modes of SELinux: - Enforcing -- This denies access to users from applications/processes based on SELinux policies. - Permissive -- This allows users to access applications/processes, but it sends logs when a user encroaches on SELinux policies. - Disabled -- This wholly disables SELinux on a Linux system.
179
What is the default policy of SELinux and what does it denote? (Pg. 559)
"Targeted" is the default policy for SELinux. It defines application/process accessibility on an admin-defined, granular level.
180
What are the modes of AppArmor? (Pgs. 562-563)
Enforce, Complain
181
What do the modes of AppArmor each denote? (Pgs. 562-563)
Modes of AppArmor: - Enforce -- It permits the minimum amount of permissions for users and applications to interact between each other based on the AppArmor rules. - Complain -- It permits users and applications to run as normal but logs any violation of AppArmor rules.
182
How do you enable AppArmor enforce mode, for example? (Pgs. 562-563)
Example: aa-enforce /etc/apparmor.d/* -- With profiles being defined under the apparmor.d directory, the profiles are only permitted minimum permissions to files and applications.
183
What is the sister command to docker? (Pgs. 597-601)
podman
184
How do you display a list of the Docker containers on a system? (Pgs. 597-601)
docker images -- Lists all of the Docker containers on a system.
185
How do you run a Docker container in the background? (Pgs. 597-601)
docker run -d -- This runs a Docker container in the background.
186
How do you run a Docker container with an interactive terminal? (Pgs. 597-601)
docker run -it -- This runs a Docker container with an interactive terminal. Enter "exit" to exit.
187
How do you restart a Docker container? (Pgs. 597-601)
docker start -ai -- This attaches a Docker container interactively in order to restart the specified container.
188
How do you end the run of a Docker container? (Pgs. 597-601)
docker stop -- This manually stops the run of a Docker container.
189
How do you delete a Docker container? (Pgs. 597-601)
docker rm AND THEN docker rmi -- The first command removes the container and then the second command removes the container image.
190
What is network bonding used to do? (Pgs. 592-593 and Found Online)
Network bonding takes the connections from multiple NICs and teams them to provide for a potentially faster network connection by using multiple interfaces instead of just one.
191
What is network bridging used to do? (Pgs. 592-593 and Found Online)
Network bridging provides a connection between multiple networks. This allows devices on different networks to be able to interact with each other.
192
How many main stages of booting a Linux system are there? (Pg. 332)
There are 4 main stages for Linux boot.
193
What are the main stages of a Linux system boot and what is their order? (Pg. 332 and Practice Exam #A14)
BIOS -> [POST -> MBR ->] GRUB -> Kernel/Primary Partition -> Systemd/Stage 2 Bootloader
194
What is done for each stage of the Linux boot process? (Pg. 332 and Practice Exam #A14)
Stages of Linux Boot: - BIOS -- Initializes hardware. - [POST -- Checks system integrity, including BIOS, and loads MBR.] - [MBR -- Loads the first sector of the primary partition from the partition table.] - GRUB -- Loads the kernel. - Kernel/Primary Partition -- Mounts the root filesystem and loads default.target. - Systemd/Stage 2 Bootloader -- Initializes the system.
195
How do you generate an SSH key of type DSA or RSA? (Pg. 491)
ssh-keygen -t -- This generates an SSH key pair in DSA or RSA form.
196
How do you transmit an SSH key to a specified client? (Pg. 494 and Online)
ssh-copy-id @
-- This copies an SSH public key over to a specified client address and into the ~/.ssh/authorized_keys file.
197
What is fail2ban? (Practice Exam #A21)
fail2ban is an intrusion protection system which dynamically bans IP addresses after they have exceeded a certain number of unsuccessful login attempts.
198
What is netfilter? (Pg. 509 and Practice Exam #A21)
Netfilter is a security infrastructure tied to the Linux kernel which handles packet filtering as well as address and port translation.
199
What is Kubernetes? (Pg. 601 and Practice Exam #A30)
Kubernetes is a platform designed for orchestrating, automating, and scaling the deployment of containers.
200
What command is used to create an initramfs image? (Pg. 341 and Practice Exam #A33)
dracut -- This command is used by the RAM disk initrd to generate RAM disk files, namely initramfs.
201
What are the two things that GRUB2 starts upon load? (Pg. 340)
GRUB2 loads the system kernel, vmlinux, and starts the initial RAM disk, initrd, or the initial RAM filesystem, initramfs.
202
What is the first filesystem loaded into the system’s memory upon boot? (Pgs. 340-341 and Practice Exam #A33, #A88)
initramfs
203
What is the primary purpose of initramfs? (Practice Exam #A88)
The primary purpose is to mount the root filesystem (/).
204
What is PVC? (Practice Exam #A33)
“PVC” = “Persistent Volume Claims”
205
What does PVC do? (Practice Exam #A33)
PVCs are “claim checks” for a given resource to hold and access physical disk space for containers using Kubernetes.
206
Instead of a cron job, what can you use to run a deferred job that won’t execute while a previous instance is still executing? (Pgs. 280-281, Practice Exam #A35, and Online)
systemd timer file
207
What is an example of a systemd timer file path? (Pgs. 280-281, Practice Exam #A35, and Online)
/etc/systemd/system/.timer -- Timers ought to be put into the /etc/systemd/system directory in order to be handled by systemd. A “systemctl start ” can be used to activate the file.
208
What does the “OnBootSec” field describe in a systemd timer file? (Pgs. 280-281, Practice Exam #A35, and Online)
The “OnBootSec” field specifies the number of seconds after boot that a job should execute.
209
What does the “OnCalendar” field describe in a systemd timer file? (Pgs. 280-281, Practice Exam #A35, and Online)
The “OnCalendar” field specifies the minute a job should execute. Examples: Sun..Sat *-*-* 20:00:00 OR minutely OR monthly
210
What does “telinit” mean? (Pg. 342)
“telinit” = “Tell Init” -- It tells the init process to perform some action.
211
What does telinit generally do? (Pg. 342)
The telinit command is used mostly to change runlevels. It communicates with the main init process to perform system tasks. Example: telinit 6 -- Instructs the system to reboot.
212
How is ipset used and what command is it typically used with? (Practice Exam #A41 and Online)
The ipset command is used to create a structure which contains a set of IP addresses. The sets are useful with the iptables command.
213
What is ipadm used to do? (Practice Exam #A41 and Online)
ipadm is used to configure a network much like the ip command. Example: ipadm disable-ip -- This disables a specified interface.
214
What does the dmesg command show? (Pg. 356 and Practice Exam #A42)
The dmesg command shows log messages for the Linux kernel, including boot messages.
215
What is the difference between insmod or rmmod and modprobe? (Pgs. 362-363)
The modprobe command accounts for dependencies, while insmod and rmmod do not.
216
How do you add a kernel module using the modprobe command? (Pgs. 362-363)
modprobe install -- This installs the specified module, including its dependencies.
217
How do you add an alias to a module with the modprobe command? (Pgs. 362-363)
modprobe alias -- This sets a specified alias for the specified module.
218
How do you remove a module with the modprobe command? (Pgs. 362-363)
modprobe -r -- This removes a specified module, including its dependencies.
219
What do TLS and DTLS mean? (Practice Exam #A44)
“TLS” = “Transport Layer Security” and “DTLS” = “Datagram Transport Layer Security”
220
What is the main difference between TLS and DTLS? (Practice Exam #A44)
TLS is based upon TCP, being loss-intolerant, and DTLS is based on UDP, which is loss-tolerant.
221
What two commands does pgrep combine? (Pg. 261 and Practice Exam #A45)
ps and grep -- It greps the process information of the ps command.
222
How do you list process names and IDs with the pgrep command? (Pg. 261 and Practice Exam #A45)
pgrep -l -- This lists a process name and process ID.
223
How do you search for a user’s processes using the pgrep command? (Pg. 261 and Practice Exam #A45)
pgrep -u -- This does a search for processes with the specified username.
224
What is a stateful firewall? (Pgs. 505-506, Practice Exam #A49, and Online)
A stateful firewall looks at network traffic end-to-end, including traffic patterns. It can implement encryption and tunneling.
225
What is a stateless firewall? (Pgs. 505-506, Practice Exam #A49, and Online)
A stateless firewall is a passive monitor which filters packets, looking at source and destination addresses.
226
What value is returned if a bash file executes successfully? (Practice Exam #A50)
0 (A non-zero value indicates an error occurred.)
227
What are the three bash file descriptors and what do they mean? (Practice Exam #A50)
File Descriptors: 0 -- STDIN 1 -- STDOUT 2 -- STDERR
228
Where are default systemd unit files found? (Pg. 344)
/usr/lib/systemd/system – This is where default systemd unit files are held. Custom unit files can be put in /etc/systemd/system to override default files.
229
What does the “What” option mean in a mount unit file? (Pg. 346 and Practice Exam #A53)
The “What” denotes the absolute path of the device to mount.
230
What does the “Where” option mean in a mount unit file? (Pg. 346 and Practice Exam #A53)
The “Where” denotes the path of where the device will be mounted.
231
What does the “Type” option mean in a mount unit file? (Pg. 346 and Practice Exam #A53)
The “Type” denotes the filesystem type being mounted.
232
How can you get the ACL permission info for a file? (Pgs. 175-176)
getfacl -- This displays the ACL permissions for a specified file.
233
What does ACL stand for? (Pgs. 175-176)
“ACL” = “Access Control List”
234
What is an example of setting ACL permissions for a file? (Pgs. 175-176)
setfacl -m u:nathand:r contracts.odt -- This modifies the ACL permissions of the file “contracts.odt,” adding read permissions for the user “nathand.”
235
How can you shut down all connections and drop all packets with the firewall-cmd command? (Practice Exam #A60)
firewall-cmd -panic-on -- This causes the system to drop all drop all connections and packets in the case of a firewall emergency.
236
What does the “DMI” mean in dmidecode? (Pg. 609 and Practice Exam #A61)
“DMI” = “Desktop Management Interface”
237
What command can you use to see the manufacturer of the Linux and BIOS information? (Pg. 609 and Practice Exam #A61)
dmidecode -- This displays the BIOS and key hardware information for a Linux system.
238
What is another name for the cron.hourly, cron.daily, cron.weekly, and cron.monthly directories?
/etc/cron.interval -- This is not a real directory but distinguishes the directories where jobs can be placed to automatically run on an hourly, daily, weekly, or monthly basis.
239
How do you edit the quota for a user? (Pgs. 212-213)
edquota -u -- This edits the quota for the specified user.
240
How do you edit the quota for a group? (Pgs. 212-213)
edquota -g -- This edits the quota for the specified group.
241
How do you list out the quota for a filesystem? (Pgs. 212-213)
repquota -- This reports the quota amount for the specified filesystem.
242
How do you list all the quotas on a system? (Pgs. 212-213)
repquota -a -- This reports all the filesystem quota on the system.
243
How do you create user and group quota database files at a specified filepath? (Pgs. 212-213)
quotacheck -cug -- This creates user and group quota database files at the specified path.
244
With what command, can you kill all of a user’s processes and log them out? (Pg. 541 and Practice Exam #A64)
pkill -KILL -u -- This will end all of the processes of a specified user and log them out.
245
What config file can you add to prevent non-root users from being able to login? (Pg. 541 and Practice Exam #A64)
/etc/nologin -- The presence of this file prevents all users, except root, from being able to login to the system.
246
What is rsync and what does it do? (Pg. 230 and Practice Exam #A67)
The rsync command synchronizes and clones copies of files between two servers.
247
What does the patch command do? (Practice Exam #A67 and Online)
The patch command is used to apply patches to source code files.
248
What is an example of patching source code with the patch command? (Practice Exam #A67 and Online)
patch -p1 -i /usr/akaul/2019-patch -- This applies the patch file /usr/akaul/2019-patch.
249
What does the dd command generally do? (Pg. 234 and Practice Exam #A67)
The dd command duplicates disk devices or converts their format.
250
What is an example of duplicating a disk device? (Pg. 234 and Practice Exam #A67)
dd if=/dev/sda of=/dev/sdb -- This duplicates the device /dev/sda to the new device /dev/sdb.
251
What is auditd? (Practice Exam #A69)
auditd is a system monitoring daemon at the kernel level. It is the default logging tool for SELinux.
252
How can you see logging details for a Docker image configuration, including IP addresses? (Pg. 597 and Practice Exam #A73)
docker inspect -- This lists configuration details for a specified Docker container image.
253
What is an example of printing a file? (Practice Exam #A76)
Example: lpr printme.txt -- This prints the file “printme.txt” using the lpd printing daemon.
254
What mode do you need to get in to do a fsck on /usr? (Practice Exam #A77)
Single-User Mode (Mode 1). On /usr and similar directories, you would need to get into single-user mode in order to fix problems with the disk that users are on with fsck.
255
What is /etc/hosts? (Pg. 458 and Practice Exam #A80)
The /etc/hosts is a manual resolver file which matches IP addresses to domain names and aliases. It is a manual list of address; it is not produced by DNS. It is the first, default name resolver on a Linux system.
256
What is /etc/sysconfig/network used to do and what are four things it is used to define? (Pg. 460 and Practice Exam #A84)
It is a file which can be used to configure a system’s network. It includes whether to allow NETWORKING=, to FORWARD_IPV4, define a HOSTNAME=, and define a remote GATEWAY=, among other things.
257
What is /etc/host.conf used to do? (Practice Exam #A84)
It is used to specify the order of which method to use to resolve a domain name. (Example: order hosts, bind -- Check /etc/hosts then DNS.)
258
With what command can you enable an SELinux mode? (Pg. 559)
setenforce -- This sets the SELinux mode on a system.
259
With what command can you display the current SELinux mode? (Pg. 559)
getenforce -- This displays the current SELinux mode on a system.
260
How can you set an SELinux mode with numbers and what do they mean? (Practice Exam #A86)
Setting SELinux with Numbers: - setenforce 1 -- This puts SELinux in Enforcing mode. - setenforce 0 -- This puts SELinux in Permissive mode.
261
How can you view all of the currently mounted filesystems on a system? (Practice Exam #A89)
mount -- This lists all of the mounted filesystems on a Linux system.
262
How do you create a bridge with the brctl command? (Pg. 498 and Practice Exam #A90)
Example: brctl addbr trilby -- This adds a bridge with the name “trilby” to the network.
263
How do you add network interfaces to a bridge with brctl command? (Pg. 498)
Example: brctl addif trilby enp0s9 enp0s10 -- This adds two network interfaces (“enp0s9” and “enp0s10”) to the bridge “trilby.”
264
What does arp stand for? (Pg. 444 and Practice Exam #B5)
“ARP” = “Address Resolution Protocol”
265
How is the arp utility used? (Pg. 444 and Practice Exam #B5)
The arp utility is used to map IPv4 addresses to MAC addresses. This makes LANs run faster.
266
What command would be best to combine the contents of files into two columns? (Practice Exam #B6)
Using the paste command. (e.g., paste file1.txt file2.txt)
267
What is an example of combining two files with a delimiter, using the paste command? (Online)
paste -d “|” -- This combines two specified files side-by-side with a “|” delimiter.
268
How is ioping used? (Pg. 211 and Practice Exam #B7)
The ioping command checks the Input/Output (I/O) latency for a disk.
269
What does iostat show? (Pgs. 211, 615 and Practice Exam #B7)
The iostat displays information regarding I/O read and write activity per second as well as total I/O and CPU loads.
270
How do you display the I/O history since the last system boot? (Practice Exam #B7)
iostat -d 2 – This shows the I/O statistics history since the last system boot.
271
What command monitors network traffic and high latency issues on networks? (Pg. 622 and Practice Exam #B8)
iftop -- This brings up an interface, detailing the network traffic on a system every two seconds (like top).
272
How would you monitor the traffic of a specific network interface with the iftop command? (Practice Exam #B8)
Example: iftop -i eth1 -- This displays the traffic for the interface “eth1.”
273
What does “udev” mean? (Pg. 368)
“udev” = “userspace /dev/”
274
What command would you use to query about hardware devices under /dev? (Pgs. 370-371 and Practice Exam #B9)
udevadm -- This works to query info, monitor, and manage devices on a system.
275
What is an example of querying properties of a device with the udevadm command? (Pgs. 370-371)
Example: udevadm info -q property -n /dev/sdb -- This queries (-q) for the property info of the specified device (-n) /dev/sdb.
276
What can be used to display memory access, interrupt, and I/O Port information for installed hardware? (Pg. 374, Practice Exam #B9, and Online)
lsdev
277
What shortcut would print the name of a bash script? (Pg. 407 and Practice Exam #B12)
$0 -- This displays the name of the file (as it is the 0th argument on the command line).
278
What shortcut would print the name of an nth argument to a script? (Pg. 407 and Practice Exam #B12)
$[n] -- This displays the nth number argument to a script.
279
What shortcut lists the number of arguments to a script? (Pg. 407 and Practice Exam #B12)
$#
280
What shortcut lists the command-line arguments to a script? (Pg. 407)
$*
281
What shortcut displays the current process’s PID? (Pg. 407)
$$
282
What shortcut displays the PID of the last background job? (Pg. 407)
$!
283
What shortcut displays the command exit status code? (Pg. 407)
$?
284
What command can you use to display all of the available partition types on a system? (Practice Exam #B17)
/sbin/sfdisk -T -- This shows all partition types and their codes.
285
How do you modify a file without creating a new file with the sed command? (Practice Exam #B19 and Online)
Example: sed -i ‘s/File Transfer Protocol/FTP/’ netspecs.doc -- This edits the netspecs.doc file in-place (-i), substituting the instances of “File Transfer Protocol” with “FTP.”
286
What command would you use to set the time zone? (Pg. 80)
With ln or cp: - Example: ln -s /usr/share/zoneinfo/US/Central /etc/localtime -- This links a time zone file to being the time zone config file /etc/localtime. - Example: cp /usr/share/zoneinfo/US/Central /etc/localtime – This copies over a time zone file to being the time zone config file /etc/localtime.
287
How do you lock a user’s account with the usermod command? (Practice Exam #B24)
usermod -L -- This locks the specified user’s account.
288
How would you set the system time to the current time of the hardware clock? (Pg. 81 and Practice Exam #B27)
hwclock <-s/--hctosys> -- This sets the hardware clock to the current system time.
289
How would you set the hardware clock time to the current system time and time zone? (Pg. 81 and Practice Exam #B27)
hwclock <-w/--systohc> -- This sets the system time to the time of the hardware clock.
290
What daemon and command would you use to list defined networks in KVM? (and Practice Exam #B29)
libvrt -- This daemon manages a list of defined networks for a KVM system. virsh net-list – This command lists the defined networks under libvrt.
291
What command should be used to analyze the boot time for each system run unit? (Practice Exam #B34)
systemd-analyze blame
292
What does the system-analyze blame command do? (Practice Exam #B34)
The systemd-analyze blame command lists all of the running units on a system and the time each took to initialize.
293
What does dpkg stand for? (Pg. 306)
“dpkg” = “Debian PacKaGe Manager”
294
How do you install a package with the dpkg command? (Pg. 307 and Practice Exam #B41)
dpkg -i -- This installs a DPKG package.
295
How do you uninstall a package with the dpkg command without deleting config files? (Pg. 307 and Practice Exam #B41)
dpkg -r -- This removes a DPKG package, without deleting any config files.
296
How do you list all of the packages on a system with the dpkg command? (Pg. 307 and Practice Exam #B41)
dpkg -l -- This lists all DPKG packages on a system.
297
How do you list all files that were installed by a specific package with the dpkg command? (Pg. 307 and Practice Exam #B41)
dpkg -L -- This lists all of the files that were installed by a specific package.
298
How do you list the package that installed a specific file with the dpkg command? (Pg. 307 and Practice Exam #B41)
dpkg -S -- This identifies which DPKG package installed the specific file.
299
How do you list the packages which have been partially installed with the dpkg command? (Practice Exam #B41)
dpkg -C -- This specifies all of the partially installed packages on a system.
300
What is a helper service for a container called? (Pg. 595)
ambassador container
301
What is a formation of multiple containers called? (Pg. 595)
pod
302
What is a helper container for a pod called? (Pg. 595)
sidecar
303
What is a formation of multiple pods called? (Pg. 596)
deployment
304
What is a group of multiple servers and/or desktops networked together called? (Pg. 596)
cluster
305
What is spooling data? (Online)
Spooling data is a buffer file which resides in a system’s storage until an external device can pick up the data in the file. Notably, a printer would use spooling files.
306
Under which directory is spooling data stored on a Linux system? (Practice Exam #B48)
/var -- As spool data should be temporary and could be deleted, depending on the job, it can be placed under this directory as logs and other transient data.
307
How do you display the current password age information with the chage command? (Pg. 109)
chage -l -- This lists password age expiration information for specified username.
308
How do you set the password's last changed date with the chage command? (Pg. 109)
chage -d -- This sets the last changed date for the password of a specified username.
309
How do you set the minimum days for password age with the chage command? (Pg. 109)
chage -m <#> -- This sets the minimum days for password change of a specified username.
310
How do you set the maximum days for password age with the chage command? (Pg. 109)
chage -M <#> -- This sets the maximum days for password change of a specified username.
311
How do you set the warn days for password age with the chage command? (Pg. 109 and Practice Exam #B52)
chage -W <#> -- This sets the warn days for password expiration of a specified username. (A negative number will disable the password.)
312
How do you set the inactive days for password age with the chage command? (Pg. 109 and Practice Exam #B52)
chage -I <#> -- This sets the inactive days for password expiration of a specified username. (A negative number states that a password will never become inactive.)
313
How do you set the expire days for password age with the chage command? (Pg. 109 and Practice Exam #B52)
chage -E <#> -- This sets the expire days for password expiration of a specified username. (A negative number will disable password expiration.)
314
What is X11 Forwarding? (Practice Exam #B61 and Online)
X11 is a tunneling utility which allows a user to run a remote computer’s GUI from a local machine. It is much like Remote Desktop on Windows.
315
What is Local Forwarding? (Pgs. 496-497, Practice Exam #B61, and Online)
Local forwarding is a matter of port forwarding from a local client tunneled through a specified port on a remote server as a jump server to a destination machine.
316
What is an example of setting up local port forwarding with SSH? (Pgs. 496-497, Practice Exam #B61, and Online)
Example: ssh -L 3336:website.server.com:3306 jump.server.com -- This configures an SSH connection from Port 3336 on the local client via the specified jump server (jump.server.com) to Port 3306 on the destination website (website.server.com).
317
What is Remote Forwarding? (Practice Exam #B61 and Online)
Remote forwarding is a matter of port forwarding from a remote server tunneled through a specified port on a local client as a jump server to a destination machine.
318
What is an example of setting up remote port forwarding with SSH? (Practice Exam #B61 and Online)
Example: ssh -R 8080:localhost:80 public.kaplan.it -- This configures an SSH connection via Port 8080 from the remote server (public.kaplan.it) via the local client specified as a jump server to Port 80 on the destination machine (in this case, itself – localhost).
319
With what command can you display environment variables on a system? (Practice Exam #B68 and Online)
env
320
What command would you use to make log files available permanently? (Practice Exam #B70)
Example: systemd-tempfiles --create --prefix /var/log/journal -- With the directory /var/log/journal manually created, this command takes logs from systemd and elsewhere and saves a copy of the logs in this directory.
321
What file lists the terminals that root users are allowed to login? (Pg. 617 and Practice Exam #B71)
/etc/securetty
322
What command can you use to disable root users from logging in? (Practice Exam #B71)
echo > /etc/securetty -- This will erase all terminal entries listed from the /etc/securetty file.
323
How can you get a listing of all the details of active network interfaces with the ifconfig command? (Pg. 449 and Practice Exam #B72)
ifconfig -- The command by itself will show all of the details of the active network interfaces on the system.
324
How can you display the MAC address of a specified NIC with the ip command? (Pg. 451 and Practice Exam #B72)
Example: ip link show eth0 -- This displays the MAC address (link) and other details for the specified interface eth0.
325
How do you add a user with a password that won’t expire with the useradd command? (Practice Exam #B73)
useradd -p -- This creates a user with a specifies password. Using the useradd command, the password will not expire.
326
How do you display a specified SELinux Boolean value? (Pg. 561 and Practice Exam #B75)
Example: getsebool cron_can_relabel -- This displays the SELinux Boolean value (on/off) for cron_can_relabel.
327
How do you enable or disable a specified SELinux Boolean value? (Pg. 561 and Practice Exam #B75)
Example: setsebool cron_can_relabel -- This sets the SELinux Boolean value for cron_can_relabel to on.
328
How do you make a SELinux Boolean value setting be retained across boots? (Practice Exam #B75)
setsebool -P -- This sets the specified SELinux Boolean value to on or off and makes this setting persistent (-P).
329
What SELinux Boolean value allows cron jobs to provide SELinux context labels? (Pg. 561)
cron_can_relabel
330
What SELinux Boolean value allows the FTP daemon full access? (Pg. 561)
ftpd_full_access
331
What SELinux Boolean value allows sysadm_u users the right to execute scripts? (Pg. 561)
sysadm_exec_content
332
What command lists detailed information for all hardware devices on the system? (Pg. 379 and Practice Exam #B81)
“lshw” = “LiSt HardWare”
333
How do you abbreviate output with the lshw command? (Pg. 380)
lshw -short -- This lists a shorter output of results for lshw.
334
How do you display hardware of a specific type with the lshw command? (Pg. 380)
Example: lshw -short -class disk -- This detailed information for all storage devices on the system.
335
What does the id command show? (Pg. 104 and Practice Exam #B90)
user ID, user ID number, group ID number, secondary groups
336
What command shows the most recently logged in users? (Pg. 555 and Practice Exam #B90)
last – This shows the recently logged-in users, login time, logout time, and where users authenticated.