1.
df -h
2.
listid
3.
ls -l
4.
blkid
Q 1 / 75
1.
discretionary access control system permissions layered over standard Linux permissions
2.
mandatory access control system permissions layered over standard Linux permissions
3.
a type of firewall for Linux
4.
the same as standard Linux permissions
Q 2 / 75
1.
route -ipv6
2.
route
3.
ip -6 route show
4.
ip route show
Q 3 / 75
bash find / -size +10M -exec ls -l {} ;
1.
It finds all files using ls -l and hands them off to the find command to display.
2.
It finds all files older than 10 minutes and long lists them using the ls command.
3.
It finds all files larger than 10 MB and long lists them using the ls command.
4.
It uses the ls command to find all files in the filesystem matching the {} wildcard.
Q 4 / 75
bash locate --regexp '^/usr.*pixmaps.*jpg$'
1.
all files in a directory named pixmaps
2.
all files ending in ".jpg"
3.
all file paths that start with "/usr", include the word "pixmaps", and end with ".jpg"
4.
all file paths that include "/usr/pixmaps" and end with ".jpg"
Q 5 / 75
1.
wireshark
2.
ethtool
3.
netstat
4.
tcpdump
Q 6 / 75
1.
log
2.
uptime
3.
runtime
4.
access
Q 7 / 75
1.
It is an application testing suite used to profile programming code.
2.
It is a local command used for monitoring local system resources in real time.
3.
It is a set of tools, services, and libraries for gathering and analyzing performance measures.
4.
It is a tool designed to change system configuration for purposes of optimization.
Q 8 / 75
1.
Create a text file including all names and use the -f option of dig.
2.
Type in each query manually.
3.
Write a shell script to send multiple dig queries to the DNS server.
4.
Save the DNS names in an SQL database and process it with dig.
Q 9 / 75
ps -e --format uid,pid,ppid,%cpu,cmd
1.
the user ID, process ID, parent process ID, CPU usage, and command name of a process
2.
the user ID, group ID, parent process ID, CPU usage, and command name of a process
3.
the UUID, process ID, parent process ID, CPU usage, and command name of a process
4.
all of these answers
Q 10 / 75
1.
!
2.
!!
3.
!*
4.
!ls
Q 11 / 75
1.
both private and public keys
2.
the ssh public key
3.
the ssh private key
4.
a fingerprint file
Q 12 / 75
1.
find
2.
fdisk
3.
du
4.
df
Q 13 / 75
1.
The backup drive is corrupted and needs to be re-created.
2.
When the backup drive was duplicated, the label was as well. When booted, the system mounted the old duplicated drive by its identical label.
3.
There is a conflict between the physical location of the backup drive and the original drive.
4.
The backup process went wrong, and the old drive was duplicated over the original drive.
Q 14 / 75
1.
The tee command sends output only to STDOUT and STDERR.
2.
A redirect sends output to STDOUT and a file, whereas a tee sends output only to STDOUT.
3.
Nothing, they are the same.
4.
The tee command sends output to STDOUT and a file, whereas a redirect sends output only to a file.
Q 15 / 75
1.
priority of one DNS server over another
2.
per network interface DNS server configuration
3.
alternative DNS services
4.
sources for name service information
Q 16 / 75
bash echo $myNumber | sed -e 's/^[[:digit:]][[:digit:]][[:digit:]]/(&)/g'
1.
It will only match digits—and since the string has only digits, the command will output the same number without changes.
2.
It will output the same 10-digit number, but every digit will be inside parentheses.
3.
It will output the entire 10-digit number inside parentheses.
4.
It will output the same 10-digit number, but the first 3 digits will be inside parentheses.
Q 17 / 75
1.
None of these answers. yum does not support downloading packages without installing them.
2.
--downloaddir
3.
-d
4.
--downloadonly
Q 18 / 75
`[0-9]`
1.
`[[:alnum:]]`
2.
`[[:digit:]]`
3.
`[[:alpha:]]`
4.
`[[:num:]]`
Q 19 / 75
1.
zip
2.
tar
3.
archive
4.
gzip
Q 20 / 75
1.
Restart dhcpd.
2.
Run /etc/hostname.
3.
Nothing, the system notices automatically.
4.
Notify systemd to update it by restarting the systemd-hostnamed service.
Q 21 / 75
1.
vgadd
2.
vgresize
3.
vgappend
4.
vgextend
Q 22 / 75
`0 1 * * *`
1.
every minute of the hour
2.
every hour of every day
3.
every day at 1:00 AM
4.
only on Mondays
Q 23 / 75
1.
netconf
2.
ipconfig
3.
ipman
4.
ip
Q 24 / 75
1.
apache_enable_homedirs
2.
httpd_enable_userdirs
3.
httpd_enable_homedirs
4.
httpd_enable_userhome_dirs
Q 25 / 75
1.
The passwd command is not used for locking passwords.
2.
There is no password -l option.
3.
It locks only the password, not the account, so users can still authenticate with keys or other methods.
4.
It does lock the account, keeping users from logging in even if they are using other authentication methods.
Q 26 / 75
1.
Piping into | pipes both stdout and stderr. Piping into |& pipes only stderr.
2.
Piping into | pipes stdout. Piping into |& pipes stdout and stderr.
3.
Piping into | pipes both stdout and stderr. Piping into |& pipes only stdout.
4.
Piping into | pipes stdout. Piping into |& pipes all open file descriptors.
Q 27 / 75
1.
The kernel identifies it as one of the names of extended commands.
2.
It has the same name as the file it modifies.
3.
It has the SUID permission mode and is owned by root.
4.
It is a system administration command.
Q 28 / 75
1.
always ask for confirmation
2.
back up the file before it deletes the file
3.
ask for confirmation if configured to do so
4.
never ask for confirmation
Q 29 / 75
1.
Access to a drive is faster than with standard partitions.
2.
Volumes can be resized smaller without unmounting them.
3.
Repairing filesystem errors is easier than with standard partitions.
4.
Volumes can be resized even if the free space is not contiguous.
Q 30 / 75
1.
Globs create a list; brace expansion matches pattern.
2.
Brace expansion requires files to exist; globs do not.
3.
Brace expansion creates a list; globs match the list of pathnames.
4.
Globs get processes first and brace expansion later.
Q 31 / 75
1.
-d
2.
-k
3.
-b
4.
-x
Q 32 / 75
bash myVar = 5 bash myVar = 5 bash myVar = 5 bash myVar = 5
1.
A
2.
B
3.
C
4.
D
Q 33 / 75
1.
shell aliases
2.
userid
3.
environmental variables
4.
scheduling priority
Q 34 / 75
1.
no_admin_squash
2.
no_root_squash
3.
allow_root_access
4.
all_squash
Q 35 / 75
bash date | mail -s "This is a remote test" user1@rhhost1.localnet.com
1.
"This is a remote test"
2.
the date, the time, and the words "This is a remote test"
3.
The email subject shows "This is a remote test" but the body of the email will be empty.
4.
the current date and time
Q 36 / 75
1.
resolving the local name
2.
blocking sites using iptables
3.
setting the hostname
4.
configuring DNS name servers
Q 37 / 75
1.
3(pattern)
2.
{0,3}(pattern}
3.
Occurrence quantifiers are not supported in Bash's version of extended globs, so this is not possible.
4.
{3}(pattern})
Q 38 / 75
1.
Samba uses Linux operating system groups from the /etc/group file; just specify the group name.
2.
It would be preceded by a percent sign (%), such as %engineers.
3.
Use the group name by itself; Samba checks for its existence.
4.
It would be preceded by an @ symbol, such as @engineering.
Q 39 / 75
1.
krb5-workstation
2.
ktutil
3.
pam_krb5
4.
kdb5_util
Q 40 / 75
1.
`?`
2.
``
3.
`/`
4.
`/search`
Q 41 / 75
1.
It is a graphical tool that manages network connections, including bonding and wireless networks.
2.
It is a security service that manages user access control of local network-aware services.
3.
It attempts to keep an active network connection available at all times.
4.
It is a command-line tool that manages network connections.
Q 42 / 75
1.
to log out a user
2.
to lock a user's account
3.
to change global user account settings
4.
to set a user's password
Q 43 / 75
1.
It prepares the filesystem for use by defragmenting it.
2.
It resizes the filesystem to match the volume group size.
3.
It does nothing.
4.
It remounts the filesystem with the new size.
Q 44 / 75
bash sed -E 's/[a-Z]{4}/($)/' textfile.txt
1.
It would substitute the letter with an ampersand (&).
2.
It would replace all letters in the textfile.txt file with ampersand (&).
3.
It would replace the first four letters with an ampersand (&).
4.
It would place parentheses around the first four letters of each line of textfile.txt.
Q 45 / 75
1.
EREs support occurrence operators.
2.
Only the syntax differs.
3.
EREs support alternation.
4.
EREs can match groups.
Q 46 / 75
1.
bonding.
2.
team.
3.
netbond.
4.
bond.
Q 47 / 75
bash find / -size -10K -exec ls -l {} ;
1.
It finds all files larger than 10k and long lists them using the ls command.
2.
It finds all files of size 10k using ls -l and hands them off to the find command to display.
3.
It finds all files in the / directory of size 10k and long lists them.
4.
It finds all files in the file system smaller than 10k and long lists them using the ls command.
Q 48 / 75
1.
/proc/swapiness
2.
/etc/fstab
3.
/etc/mounts
4.
/etc/swaps
Q 49 / 75
1.
systemctl list-services.
2.
chkconfig --list-all
3.
systemctl list-unit-files -at service
4.
systemctl list-unit-files -t service
Q 50 / 75
1.
gpasswd
2.
passwd
3.
editsam
4.
grouppass
Q 51 / 75
1.
two dashes
2.
a backslash
3.
one dash
4.
nothing
Q 52 / 75
1.
The script will remain running in the background even if you reboot the system.
2.
The script will run in your terminal and you will not be able to do anything until it completes.
3.
The script will run in the background until you end the session.
4.
The script will run in the background and will continue running even if you end the session.
Q 53 / 75
1.
enter the root user's password
2.
enter their own password
3.
enter the sudo user's password
4.
change to the root group
Q 54 / 75
`0 22 * * 1-5`
1.
on the 22nd of every month from June to May
2.
at 10:00 PM Monday to Friday
3.
every 22 minutes every day except weekends
4.
from 1:00 AM to 5:00 AM on the 22nd of every month
Q 55 / 75
**Note:** TCP Wrapper works on Application Layer but answer is not too much confirmed.
1.
Firewalls are only service specific, whereas TCP Wrappers can block all traffic.
2.
TCP Wrappers works at the network layer, so it blocks traffic before the firewall even sees it.
3.
Firewalls easily spawn commands to operate on connection data, whereas TCP Wrappers cannot.
4.
TCP Wrappers works at the application layer, so it can make access decisions on encrypted data.
Q 56 / 75
**Note:** This is correct because of the keyword "directory". More info at: https://www.tutorialspoint.com/unix/unix-file-permission.htm
1.
They can execute files in it.
2.
They can traverse it.
3.
They can read files in it.
4.
They can delete files in it.
Q 57 / 75
`echo "Thu Jun 4 15:45:45 PDT 2020" | cut -f3 -d" "`
1.
It will print nothing.
2.
Thu Jun 4 15:45:45 PDT 2020
3.
0.6567708333333333
4.
4
Q 58 / 75
if ls /etc/passwd &> /dev/null then echo "exists" fi
1.
The code snippet cannot be improved, this is a valid way of checking for the existence of a file.
2.
Use Bash's built-in `[[ ]]` test conditions instead of the ls command.
3.
The redirect to `/dev/null` will silence the return code invalidating the conditional. Removing the redirect will solve this.
4.
The ls command will output the name of the file to the screen. Running ls in quiet mode will improve the code snippet.
Q 59 / 75
**Note:** This is the correct answer because "mask" prohibits all kinds of activation of the unit, including manual activation.
1.
systemctl disable crond
2.
systemctl disallow crond
3.
systemctl mask crond
4.
systemctl stop crond
Q 60 / 75
1.
The device order may change on boot, resulting in a system that will not boot properly.
2.
The user may run out of device letters.
3.
There are no issues with referring to partitions by their partition path.
4.
It is more difficult identifying mounted devices by partition path.
Q 61 / 75
**Explanation**: Man page of grep command.
1.
grep -E
2.
grep -B
3.
grep -e
4.
grep -G
Q 62 / 75
1.
a facility and an action
2.
a filter and an action
3.
a facility and a priority
4.
a filter and a priority
Q 63 / 75
1.
nmcli
2.
ip
3.
Onmtui
4.
nm-connection-editor
Q 64 / 75
1.
It will clean up all previously generated binaries and perform a new build.
2.
It will run rules of compilation and building.
3.
It will look for a file called makefile in your current directory.
4.
It will build only programs that need to be rebuilt.
Q 65 / 75
1.
-S
2.
--selinux
3.
--MAC
4.
-Z
Q 66 / 75
1.
whoami and logname provide the same information.
2.
whoami tells who are you currently, and logname tells who you were when you logged in initially.
3.
logname specifies the name of the login log file, and whoami prints the logged in username.
4.
whoami shows you who logged in as initially, and logname shows who are you currently.
Q 67 / 75
1.
declare -a
2.
aarray
3.
array -a
4.
declare -A
Q 68 / 75
1.
lvcopy
2.
tar
3.
pvmove
4.
cp
Q 69 / 75
1.
The `==` operator performs a string comparison; `=~` performs a regex comparison.
2.
The `==` operator performs a string comparison; `=~` performs a glob pattern comparison.
3.
The `=~` operator performs a string comparison; `==` performs a regex comparison.
4.
There is no `=~` operator in BASH `if` conditionals.
Q 70 / 75
shell echo "data" | tee -a file.txt echo "data" >> file.txt
1.
The first line will append the word `data` to file.txt and output it on the screen. The second line will append the word `data` only to file.txt.
2.
They are the same.
3.
The first line will append the word `data` to file.txt and there will be no output on the screen. The second line will output the word `data` on the screen and append it to `file.txt`
4.
Both lines will overwrite file.txt with the word data.
Q 71 / 75
shell (ss).*1
1.
addressee
2.
possess
3.
barrenness
4.
successfully
Q 72 / 75
1.
compile the script with a CGI compiler
2.
make the script executable
3.
make the script executable and set the `httpd_enable_cgi` SELinux boolean
4.
change the ownership of the script to Apache
Q 73 / 75
1.
`firewall-cmd --permanent --add-nat`
2.
`firewall-cmd --permanent --add-masquerade`
3.
`firewall-cmd --zone=default --add-nat`
4.
`firewall-cmd --zone=default --add-masquerade`
Q 74 / 75
if [[ $FILE == $GLOB ]] ;then #### 76. `journald` differs from traditional logging services such as `rsyslogd` and `syslogd` because its logs are **_** by default. ### Q77. What is the purpose of a Mail Transport Agent (MTA)? ### Q78. What do you need to do before you can perform SSH passwordless logins? ### Q79. When installing a downloaded package on the RedHat-based distribution manual using RPM, what may you have to do first? ### Q80. With GNU tools such as a GNU grep, awk, and sed, what is the difference between basic regular expressions (BREs) and extended regular expressions (EREs)? ### Q81. What is the difference between reading the list of disk partitions from `/proc/partitions` and getting it using `fdisk -l`? ### Q82. What would be in out.txt? cat < in.txt > out.txt
1.
The single equal sign (`=`) is an assignment operator; the double equal sign (`==`) checks equality.
2.
There is no difference.
3.
The single equal sign (`=`) checks equality; the double equal sign (`==`) checks string equality.
4.
The double equal sign (`==`) is an assignment operator; the single equal sign (`=`) checks equality.
5.
stored remotely
6.
text
7.
persistent
8.
not persistent
9.
It transports the mail from user's computer to the mail server.
10.
It accepts mail and adds it to the mail queue for further processing.
11.
It stores the mail in a mail queue waiting for the MUA to download it.
12.
It transports mail from one mail server to another.
13.
Genetare RSA or DSA key pairs using ssh-keygen.
14.
Change the remote user's password.
15.
Create a local SSL certificate.
16.
Change the remote SSH configure to allow it.
17.
Compile the package source code.
18.
Download all dependencies and install them before installing the desired package.
19.
Agree to an end-user license agreement.
20.
provide the --resolve option so RPM resolves all packages dependency.
21.
EREs can match the groups.
22.
EREs support occurrence operators.
23.
ERE's support alternation.
24.
only the syntax differs.
25.
`/proc/partitions` represents the disk partition table more accurately than `fdisk -l`
26.
`/proc/partitions` shows only mounted drives. `fdisk -l` shows all drivers.
27.
There is no difference between the two, and both lists contain the same data.
28.
`/proc/partitions` is the kernel's list of partitions held in ram. `fdisk -l` reads the partition table from the drive itself.
29.
the content of in.txt.
30.
the output from the command line.
31.
Nothing, because you cannot redirect from a file (in.txt) to another file (out.txt). You can redirect only from a command to a file.
32.
Nothing, The redirect will create a new empty file, but there will not be any output from the cat command to redirect.
Q 75 / 75