🐧 Linux Study Quiz
#1. Which of the following Linux distributions use the dpkg package management system? (Choose TWO correct answers.)
Suse
Mandriva
Red Hat
Debian
Ubuntu
Debian and Ubuntu use dpkg; others like Red Hat use RPM.
#2. Which of the following applications are used to play an MP3 file on a Linux system? (Choose THREE correct answers.)
Audacious
Banshee
Amarok
LibreOffice Player
Xara Xtreme
Audacious, Banshee and Amarok are Linux audio players.
#3. Which one of the following statements concerning the General Public License (GPL) is true?
The GPL is designed to ensure that the source code of a software remains freely available.
The GPL is identical to the BSD license.
If you change a program you received under the GPL, you must send your changes to the original author for approval.
GPL software may never be sold for money.
GPL software may not be used to run nuclear reactors or air traffic control systems.
GPL ensures software remains free and source code is available.
#4. What is the preferred source for the installation of new applications?
A CD-ROM disk
The vendor's version management system
The vendor's website
A retail store
The distribution's package repository
Package repositories are the safest install source.
#5. Which of the following can be used to access the command line?
BIOS
Terminal
XWindow
Xargs
Firefox
Terminal is used to access CLI.
#6. Which Linux distribution is used as a basis for the creation of Ubuntu Linux?
SUSE Linux
Gentoo Linux
Arch Linux
Red Hat Linux
Debian Linux
Ubuntu is based on Debian.
#7. Which of the following programs is not a graphical web browser?
Firefox
Links
Konqueror
Chrome
Opera
Links is a text-based browser.
#8. Which of the following software packages is an e-mail server?
Thunderbird
MySQL
Postfix
GIMP
Apache
Postfix is a mail server.
#9. What does LAMP mean?
The bus ID of an attached USB device that emits light.
Short for lamport-clock which is important in distributed network computing.
The Linux Advanced Mode Programming Interface which gives advanced capabilities to application developers.
The combination of Linux, Apache, MySQL and PHP or other programming languages.
Short for Lightweight Access Management Protocol which synchronizes permissions in a network.
LAMP = Linux, Apache, MySQL, PHP.
#10. Which of the following answers is NOT true for cloud computing?
Cloud computing is the delivery of on-demand computing services
Cloud Computing implies sharing all information with everyone else in 'the cloud'.
From the business perspective, Cloud Computing means outsourcing or centralization of IT operations.
Cloud Computing provides new tools to manage IT resources.
Cloud computing does NOT mean sharing everything publicly.
#11. Which of the following is a Linux based operating system for use on mobile devices?
iOS
CentOS
Debian
Android
Android is based on the Linux kernel and designed for mobile devices.
#12. Which one of the following is true about Open Source software?
Open Source software is available for commercial use.
The freedom to redistribute copies must include binary or executable forms of the software but not the source code.
Open Source software can not be copied for free.
Open Source software is not for sale.
Open source software can be freely used, modified, and even sold commercially.
#13. Which of the following is a requirement of the GPL license but not the BSD license?
The GPL license contains a disclaimer of warranty requiring users not to hold the software authors liable for any damages.
Users who modify and distribute the software under the GPL license, must make the modifications they made, available to the recipients under the same license.
The GPL license requires that any legal disputes be settled with the mediation of the Free Software Foundation.
The GPL license forbids the removal of copyright and license notices from source code files that are distributed.
GPL requires derivative works to remain open source under the same license (copyleft).
#14. What is the first character for file or directory names if they should not be displayed by commands such as ls unless specifically requested?
. (dot)
\ (backslash)
- (minus)
_ (underscore)
Files starting with a dot are hidden by default in Linux.
#15. Which of the following commands moves the directory ~/summer-vacation and its content to ~/vacation/2011?
mv ~/summer-vacation ~/vacation/2011
move -R ~/summer-vacation ~/vacation/2011
mv /home/summer-vacation /home/vacation/2011
mv ~/vacation/2011 ~/summer-vacation
mv -R ~/summer-vacation ~/vacation/2011
mv moves or renames files and directories.
#16. Which of the following commands can be used to create a file?
mkfile
create
nico
touch
build
touch creates an empty file or updates timestamps.
#17. Which option will cause the echo command NOT to output a trailing newline?
-s
-n
-e
-p
-n prevents echo from adding a newline at the end.
#18. Which commands provide help for a specific Linux command? (Choose TWO correct answers.)
info
helpme
man
whatdoes
ask
man and info provide documentation for commands.
#19. Which is a suitable command to find the next appearance of the word hidden in a man page being viewed from the command line?
CTRL-F hidden
/hidden
find hidden
/? hidden
/ searches forward in man/less pages.
#20. Which of the following are correct commands for changing the current directory to the user's home? (Choose TWO correct answers.)
cd ~
cd /home
cd /
cd
cd ..
cd or cd ~ both take you to the user's home directory.
#21. While deleting all files beginning with the letter a there was still the file Access.txt left. Assuming that it had the correct ownership, why was it not deleted?
Linux file names are case sensitive.
The file Access.txt was hidden.
rm had to be called with the option -R to delete all files.
Files with extensions need a different treatment.
The file Access.txt was probably opened by another application.
Linux is case-sensitive, so 'a*' does not match 'Access.txt'.
#22. Which command line can be used to search help files that mention the word "copy"?
copy –help
whatis copy
man -k copy
man copy
copy help
man -k searches manual pages by keyword.
#23. Which command is used to make a shell variable known to subsequently executed programs?
announce
mv
transfer
export
env
export makes variables available to child processes.
#24. Which command lists all files in the current directory that start with a capital letter?
list-uppercase-files
ls A-Z
ls A-Z*
ls --uppercasefiles
ls [A-Z]*
[A-Z]* matches files starting with uppercase letters.
#25. Which command shows if /usr/bin is in the current shell search path?
echo $PATH
cat PATH
echo %PATH%
echo %PATH
cat $PATH
$PATH contains directories searched for executables.
#26. Which of the following commands will display a list of all files in the current directory, including those that may be hidden?
ls --hidden
ls --a
ls -h
ls -a
ls -a shows all files including hidden ones.
#27. Which of the following commands increases the number of elements in a directory? (Choose TWO answers)
touch newfile
ls newfile
rmdir newdirectory
create newfile
mkdir newdirectory
touch creates files and mkdir creates directories.
#28. How is it possible to determine if an executable file is a shell script which is read by Bash?
The file must end with .sh.
Scripts are never executable files.
/bin/bash has to be run in debug mode.
The r bit is set.
The first line starts with #!/bin/bash.
The shebang (#!) defines which interpreter runs the script.
#29. Which of the following commands can be used to view a file and do search operations within it while viewing the contents?
less
find
report
grep
see
less allows viewing and searching within files.
#30. Which function does a shell program serve?
It receives user commands and executes them.
It is responsible for logging a user into the system.
It is responsible for establishing a connection to another computer.
It provides a graphical environment.
The shell interprets and executes user commands.
#31. Which of the following commands can be used to extract files from an archive?
tar –v
tar -evf
tar -e
tar -xvf
tar -vf
tar -xvf extracts files from an archive.
#32. What is the output of the following command? tail -n 20 test.txt
The first 20 lines of test.txt.
The last 20 lines of test.txt including blank lines.
The last 20 lines of test.txt omitting the blank lines.
The last 20 lines of test.txt with line numbers.
tail -n 20 shows the last 20 lines of a file.
#33. Which commands will archive /home and its content to /mnt/backup? (Choose TWO correct answers.)
tar -cf /mnt/backup/archive.tar /home
cp -ar /home /mnt/backup
copy -r /home /mnt/backup
sync -r /home /mnt/backup
mv /home /mnt/backup
tar archives files, cp -ar copies directories recursively.
#34. Why is the file data.txt empty after executing sort data.txt > data.txt?
Because the file gets truncated before sort is executed.
Because sort cannot sort text files, only binary files.
Because, if data.txt is empty now, it must have been empty before.
Because sort detects that both files are the same
Redirection truncates the file before sort reads it.
#35. What keyword is missing from the following segment of the shell script? for i in *; _____ cat $i done
enod
fi
run
then
do
do is required in a for loop structure.
#36. Which of the following statements may be used to access the second command line argument to a script?
"$1"
"$ARG2"
"$2"
$1
'$2'
$2 represents the second argument in a script.
#37. Which of the following commands will output all of the lines that contain either the string Fred or fred? (Choose TWO correct answers.)
grep -v fred data_file
grep -i fred data_file
grep '[f]red' data_file
egrep fred data_file
grep '[Ff]red' data_file
grep -i ignores case, [Ff] matches both cases explicitly.
#38. The output of the program date should be saved in the variable actdat. What is the correct statement?
date | actdat
actdat=`date`
set actdat='date'
actdat=date
date > $actdat
Backticks execute commands and assign output to variables.
#39. What two character sequence is present at the beginning of an interpreted script? (Please specify the TWO correct characters only)
enter answer here
#! (shebang) defines the script interpreter.
#40. How can the current directory and its subdirectories be searched for the file named MyFile.xml?
find . -name MyFile.xml
grep -r MyFile.xml .
search Myfile.xml ./
less MyFile.xml
grep MyFile.xml | find
find searches directories recursively for files.
#41. Which of the following commands will set the variable text to olaf is home? (Select TWO answers)
text="olaf is home"
text=$olaf is home
text=olaf\ is\ home
text=='olaf is home'
$text='olaf is home'
Variables with spaces need quotes or escaped spaces.
#42. Which of the following commands will create an archive file, named backup.tar, containing all the files from the directory /home?
tar -cf /home backup.tar
tar -xf backup.tar /home
tar /home backup.tar
tar -xf /home backup.tar
tar -cf backup.tar /home
tar -cf creates an archive file.
#43. What is the output of the following command? for token in a b c; do echo -n ${token}; done
abc
a b c
{a}{b}{c}
anbncn
$token$token$token
echo -n prints without spaces or newline, resulting in concatenation.
#44. Which command will display the last line of the file foo.txt?
head -n 1 foo.txt
tail -n 1 foo.txt
last -n 1 foo.txt
tail foo.txt
tail -n 1 outputs the last line of a file.
#45. How can the normal output of a command be written to a file while discarding the error output?
command /dev/null
command >file 2>/dev/null
command >2>file 1&>/dev/null
command > /dev/null 2&>1 output
command > discard-error > file
2>/dev/null discards error output while keeping normal output.
#46. Which of the following commands can be used to extract content from a tar file?
tar –v
tar -c
tar -xvf
tar -vf
tar -e
tar -xvf extracts files from an archive.
#47. Which of the following is a combined audio/video interface for transmission of digital data?
DVD
HDMI
VGA
DVI
ATI
HDMI carries both audio and video digitally.
#48. Which of the following commands is used to look up the current IP address of a system?
sysinfo | grep ipaddress
ipconfig
less /proc/net/ipconfig
showip
ifconfig
ifconfig shows network interface configuration including IP.
#49. Which of the following hardware devices links a number of computers together to form an Ethernet LAN?
Connector
Access point
Server
Switch
Terminal
A switch connects multiple devices in a LAN.
#50. What is the number called that is used to identify a process?
Process Entry
PIN
PID
Proc Num
PID (Process ID) uniquely identifies a process.
#51. Which criteria are useful when deciding which operating system to use? (Choose THREE correct answers.)
License costs.
Ideological preferences of the system administrator.
Linux can do everything, there is no need for further evaluation.
Availability of mandatory applications and tools.
Skills of the administrators and staff.
Cost, required software, and staff skills are key OS selection factors.
#52. Which of the following commands are used to view memory usage? (Choose TWO correct answers.)
ps
top
nice
memory
free
top and free display memory usage.
#53. Which of the following directories is often used to store log files?
/usr
/temp
/home
/dev
/var
/var stores variable data like logs.
#54. Identify the proper device for the third partition, on the second hard disk, on the first IDE controller on a PC system.
/dev/hdc1d2p3
/dev/hdb3
dev/hdc1a3
/dev/hd1b3
dev/hdc1b3
/dev/hdb3 refers to the second disk, third partition.
#55. A Linux computer has no access to the internet. Which command displays information about the network gateway for the system?
traceroute
gateway
ifconfig
route
ipconfig
route shows routing table including gateway.
#56. Where is the BIOS located?
RAM
LCD monitor
Motherboard
Hard drive
BIOS is stored on the motherboard firmware.
#57. Which network interface always exists in a Linux system?
lo
eth0
wlan0
sit0
vlan0
lo is the loopback interface always present.
#58. Which command will display running process information in real time?
top
process
ps current
show current
top shows real-time process activity.
#59. After installing a new package, in which directory are you most likely find its configuration file?
/opt
/usr
/etc
/conf
/lib
/etc contains configuration files.
#60. Which of the following Ubuntu releases is considered most stable and fit to use for business purposes?
Xubuntu
Kubuntu
Xubuntu Server
LTS
Ubuntu Vanilla
LTS releases are stable and supported long-term.
#61. What is the command that will show system boot time messages?
echo
display system boot
lspci
messages
dmesg
dmesg shows kernel boot messages.
#62. Which of the following filesystems is most commonly used for Linux distributions?
NTFS
ext4
HFS+
FAT32
ext4 is the most common Linux filesystem.
#63. Which permissions should be given to a file that needs to be opened and edited by the file's owner and opened read-only by the file's group?
0466
0444
0640
0540
0751
0640 allows owner read/write and group read-only.
#64. Which of the following commands can be used to determine the time of the last login of a given user?
history
recent
last
login
showlog
last shows login history.
#65. Which of the following files holds the definition of the local user accounts?
/etc/passwd
/etc/secret
/etc/users
/etc/id
/etc/home
/etc/passwd stores user account info.
#66. The following line is found in which system file? root:x:0:0::/root:/bin/bash
/etc/user.conf
/etc/password
/etc/passwd
/usr/bin/shadow
/etc/shadow
That format is from /etc/passwd.
#67. Given the following directory permissions: drwxrwxrwt 14 root root 36864 2012-03-02 11:17 /tmp What does the letter t at the end of drwxrwxrwt indicate?
It is a temporary bit that prevents launching commands in this directory.
It indicates that this directory contains only temporary files that may be deleted.
It is the sticky bit that causes all commands in this directory to be launched as root.
It means that even though the directory is globally writable only the owner can delete their own files.
It makes the directory accessible for everybody.
Sticky bit means users can only delete their own files.
#68. When a new user is added, where does the user ID get stored?
/etc/realm
/etc/passwd
/etc/users
/etc/shpasswd
/etc/pass
User IDs are stored in /etc/passwd.
#69. What is the usual absolute path of the personal directory for the user foo?
enter answer here
Default home directory is /home/username.
#70. Which statement about users and user groups is correct?
A group can only have one main user.
There can be only one user group on a system.
Every user belongs to a least one user group.
Users do not have to belong to a user group.
Every user belongs to at least one group.
#71. What are the three sets of permissions for a file?
administrator, group, others
user, standard user, others
user, group, others
administrator, standard user, others
Permissions are user, group, others.
#72. Which command displays the list of groups to which a user belongs?
whoami
who
lsgroup
id
id shows user and group membership.
#73. You have a program called /usr/bin/foo. You wish to create a symbolic link, /home/user/foo, that points to it. Which command will do this task?
ln -sym /home/user/foo /usr/bin/foo
ln /usr/bin/foo /home/user/foo
ln --symlink /home/user/foo /usr/bin/foo
ln /home/user/foo /usr/bin/foo
ln -s /usr/bin/foo /home/user/foo
ln -s creates a symbolic link.
#74. Which of the following will change the group that is associated with a file?
ls -g
chmod
chmod -w
chown
chown changes owner and optionally group.
#75. What command would you use to get comprehensive documentation about any command in Linux?
echo command
get command
locate command
help command
man command
man shows full documentation for commands.
#76. Which of the following answers are true for cloud computing? (Choose two)
Cloud Computing is the opposite of green IT; i.e. the use of fossil, nonregenerative energy for computing.
From the business perspective, Cloud Computing means outsourcing or centralization of IT operations.
Cloud Computing provides new tools to manage IT resources.
Cloud Computing implies sharing all information with everyone else in I the cloud.
Cloud computing centralizes IT and provides management tools.
#77. Which of services are used for network file systems? (Choose two)
Samba
OpenLDAP
Rumba
Python
NFS
Samba and NFS provide network file sharing.
#78. Which of the following possibilities is only available when using open source software?
Access to its detailed help manual.
Download of all its existing versions.
Access to its source code.
Free use.
Open source uniquely provides access to source code.
#79. Which of statements is true for a Linux distribution used in an enterprise environment?
These distributions contain software versions that have proven to be stable even if it is not the recent version in order to minimize problems.
These distributions contain proprietary business-related software.
These distributions always contains the newest versions of all packages to minimize the time to market of new features.
These distributions are only affordable by large companies.
Enterprise distributions favor stability over latest features.
#80. Which of the following applications are popular Open Source relational database systems? (Choose two)
MongoDB
PostgreSQL
MySQL
NoSQL
DB/2
MySQL and PostgreSQL are open source relational databases.
#81. When using a web browser, what should a user do to prevent private data from being stored locally?
Browsers can be configured to use a private mode that does not store any data locally.
There is no way to achieve that because Linux always logs network data.
Use the secure versions of the browser available.
Delete the profile directory in the home directory and create a new one after the work is done.
Set up a second profile and use only that one to access sensitive sites.
Private/incognito mode prevents storing history, cookies, and local data.
#82. Which statements are true about virtualization? (Choose two)
Virtualization is not supported by Linux because of its permissions and multiuser requirements.
Virtualization allows separation of services, tasks and users in distinct virtual machines.
Virtualization lets you run several operating systems on the same hardware in parallel.
Virtualization is a proprietary technology that has additional licence costs even for Linux.
Virtualization is a pure desktop technology that should not be used on servers.
Virtualization allows multiple OS instances and isolates environments.
#83. Which statements are correct regarding distributions? (Choose two)
To start a new distribution a Linux International license is needed.
Program packages of one distribution can be adapted for another.
Programs can be installed manually and without a packet manager.
Only commercial distributions offer regular security updates.
Distributions restrict the user to its supported program packages.
Packages can be adapted across distributions and installed manually.
#84. Which command shows all of the directories that the shell searches for programs?
cat $PATH
more $ALL_PATH
less $PWD
get $PATH
echo $PATH
echo $PATH shows all directories searched for executables.
#85. Which of the following commands will output a list of all of the file names, under your home directory and all subdirectories, which have file names ending with .pdf?
Is -name -R I *.pdf
find /home/*.pdf
find ~ -name '*.pdf'
search .pdf
find with -name searches recursively using patterns.
#86. When creating a new file, what can be done to make the file hidden from the default output of the Is command?
Hide the file with a name beginning with a period like .foobar.txt.
Hide the file with chvis +h filename.
Hide the file with a name commented out with a hash sign like #foobar.txt.
Hide the file with chmod a+h filename.
Hide the file with hide filename.
Files starting with a dot are hidden by default.
#87. Which of the following programs is used to search for files in a file system?
findfiles
flocate
locate
search
showfiles
locate searches files using a prebuilt index.
#88. Which of the following is a valid option for a typical command to get its built-in usage information?
--manual
-help
help
-H
-?
-help (or similar flags) shows command usage info.
#89. Which of the following is an example of globbing?
Is /etc/*.txt
Is /etc/ I more
Is /etc/ 2> files.txt
Is /etc/ > files.txt
*.txt is globbing (pattern matching for filenames).
#90. What is the correct command to extract the contents of the archive file download.bz2?
unzip download.bz2
uncompress download.bz2
unpack download.bz2
unzip2 download.bz2
bunzip2 download.bz2
bunzip2 decompresses .bz2 files.
#91. Which of the following commands will display a list all files in the current directory including the hidden files?
ls -h
ls --a
Is --hidden
Is -a
ls -a shows all files including hidden ones.
#92. Which command will delete the directory foo with all its content?
rmdir -a foo
rm -r foo
rm -a foo
rmdir foo
rm -r removes directories and their contents.
#93. The script, script.sh, consists of the following lines: #!/bin/bash echo $2 $1 Which output will appear if the command, script.sh test1 test2, is entered?
script.sh test1
test1 script.sh
script.sh test2
test2 test1
test1 test2
$2 $1 reverses argument order, so output is test2 test1.
#94. Which approach will provide a listing of the contents in a tar archive?
Use the zlist command.
Use the grep command.
Use the find command.
Use the tar command with -t.
Use the zless command.
tar -t lists contents of an archive.
#95. Which of the following commands redirects the output of cmd to the file foo.txt, in which an existing file is overwritten?
cmd > foo.txt
cmd Il foo.txt
cmd I foo.txt
cmd && foo.txt
cmd >> foo.txt
> overwrites a file with command output.
#96. Given a file called birthdays containing lines like: YYYY-MM-DD Name 1983-06-02 Tim 1995-12-17 Sue Which command would you use to output the lines belonging to all people listed whose birthday is in May or June?
grep 05?6? birthdays
grep birthdays
grep 06 birthdays I grep 05
grep '[0-9]*-0[56]-' birthdays
Regex [0-9]*-0[56]- matches months 05 and 06.
#97. Which of the following command sequences overwrites the file foobar.txt?
echo "QUIDQUIDAGIS" | foobar.txt
echo "QUIDQUIDAGIS" >> foobar.txt
echo "QUIDQUIDAGIS" > foobar.txt
echo "QUIDQUIDAGIS" < foobar.txt
> overwrites file content, >> appends.
#98. Which character starts a comment line in a shell script file?
*
/
#
;
# starts a comment in shell scripts.
#99. Which command chain will count the number of regular files with the name of foo.txt within /home?
grep -R foo.txt /home | wc -I
find /home -type f -name foo.txt | wc -l
find /home -name foo.txt | wc -l
Is -IR /home | grep foo.txt | wc -I
find /home -name foo.txt -count
find + wc -l counts matching files.
#100. What does the exit status O indicate about a process?
The process ended without any problems.
The process was terminated by the user.
The process waited for an input but got none.
The process finished in time.
The process couldn't finish correctly.
Exit status 0 means successful execution.
#101. With which command can you determine the time of the last restart of a system?
expect --reboot
last | reboot
find reboot
current reboottime
last reboot
last reboot shows system reboot history.
#102. Which files will affect the domain name resolution system on Linux? (Choose two)
/etc/which
/etc/nameserver
/etc/resolv.conf
/etc/hosts
/etc/hostname
/etc/hosts and /etc/resolv.conf affect DNS resolution.
#103. Where can a boot loader be installed?
The boot ROM
The boot RAM
The /boot partition
The MBR on a hard drive
Boot loaders are commonly installed in the MBR.
#104. Which command shows, amongst other information, the IP address of the current DNS server for a Linux system?
cat /etc/resolv.conf
cat /etc/net/dns.conf
ifconfig -v dns
cat /etc/net/nameserver.conf
show net dns
/etc/resolv.conf contains DNS server info.
#105. Which of the following commands can be used to change both the owner AND group settings of a file?
chmod
chown
chage
chuser
chgrp
chown changes both owner and group.
#106. What are the three sets of permissions for a file?
user, group, others
administrator, group, others
administrator, standard user, others
user, standard user, others
Permissions are user, group, others.
#107. Which of the following is the home folder for the root user?
/user/root
/root
/
/home/root
Root user's home directory is /root.
#108. What is the command to change the password of a user?
passwd
password
epasswd
wpasswd
gpasswd
passwd changes a user's password.
#109. What command line will create the user falco with home directory assigned to the group users as primary group?
useradd -g users falco
useradd -m -g users falco
add user falco@users
add -user falco -group users
useradd -f users falco
-m creates home directory, -g sets group.
#110. Which of the following properties of a user account determines whether the user is given administrator privileges?
Its username is root.
Its GECOS (name) field is set to "System Administrator"
Its primary group ID is O (zero).
It is listed first in /etc/passwd
Its user ID is O (zero).
UID 0 grants root (administrator) privileges.
#111. Given a directory with the following information. drwxrwxrwxt 12 tu tg 36864 2012-03-15 /home/directory/ Which of the following statements are true? (Choose two)
Everybody can delete only his own files.
The directory is broken.
Everybody can create files in the directory.
The directory is a security risk.
Files in the directory are created with read, write and execute permissions for everyone.
Sticky bit allows all users to create files but only delete their own.
#112. Which TWO commands can be used to make the file /tmp/foo.txt readable for all users?
chmod 111 /tmp/foo.txt
chmod 770 /tmp/foo.txt
chmod 444 /tmp/foo.txt
chmod 640 /tmp/foo.txt
chmod 644 /tmp/foo.txt
444 and 644 make file readable by all users.
#113. Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.100.165 stored on a DNS server?
In the RNAME record for 198-51-100-165.rev.arpa.
In the PTR record for 165.100.51.198.in-addr.arpa.
In the ARPA record for 165.100.51.198.rev.
In the A record for 165.100.51.198.ipv4.arpa.
In the REV record for arpa.in-addr.198.51.100.165.
Reverse DNS uses PTR records in in-addr.arpa format.
#114. Members of a team already have experience using Red Hat Enterprise Linux. For a small hobby project, the team wants to set up a Linux server without paying for a subscription. Which of the following Linux distributions allows the team members to apply as much of their Red Hat Enterprise Linux knowledge as possible?
Ubuntu Linux LTS
CentOS
Raspbian
Debian GNU/Linux
openSUSE
CentOS is binary-compatible with Red Hat Enterprise Linux.
#115. What information can be displayed by top?
User groups, ordered by the number of members
Running processes, ordered by CPU or RAM consumption.
User accounts, ordered by the number of logins.
Existing files, ordered by their size.
User accounts, ordered by the number of files.
top shows running processes and resource usage.
#116. Which of the following commands can be used to resolve a DNS name to an IP address?
dnsname
iplookup
dns
host
query
host resolves domain names to IP addresses.
#117. What is true about the dmesg command? (Choose two.)
It immediately outputs all new messages written to the system journal
It sends messages to the command lines of all current user sessions.
It might not display older information because it was overwritten by newer information.
It displays the content of the Linux kernel's ring buffer.
It traces the execution of a command and shows each step the program carries out.
dmesg shows kernel ring buffer and may overwrite older messages.
#118. Which of the following outputs could stem from the command last?
1 ls 2 cat text.txt 3 logout
Password for user last changed at Sat Mar 31 16:38:57 EST 2018
EXT4-fs (dm-7): mounted filesystem with ordered data mode. Opts: (null)
root tty2 Wed May 17 21:11 - 21:11 (00:00)
Last login: Fri Mar 23 10:56:39 2018 from server.example.com
last shows login sessions like terminal logins.
#119. What is the UID of the user root?
0
-1
255
65536
1
Root always has UID 0.
#120. What is true about the owner of a file?
The owner of a file cannot be changed once it is assigned to an owner.
When a user is deleted, all files owned by the user disappear.
The owner of a file always has full permissions when accessing the file.
Each file is owned by exactly one user and one group.
The user owning a file must be a member of the file's group.
Each file has exactly one owner and one group.
#121. Which of the following permissions are set on the /tmp/ directory?
rwSrw-rw-
rwxrwS---
rwxrwxrwt
------rwX
r-xr-X--t
/tmp has rwxrwxrwt permissions (world-writable with sticky bit).
#122. Which command adds the new user tux and creates the user's home directory with default configuration files?
passwd -a tux
useradd -m tux
usercreate tux
defaultuser tux
useradd -o default tux
useradd -m creates a user and its home directory.
#123. What information is stored in /etc/passwd? (Choose three.)
The user's default shell
The username
The user's storage space limit
The encrypted password
The numerical user ID
/etc/passwd stores username, UID, and default shell.
#124. Which of the following tar options handle compression? (Choose two.)
-g
-bz
-z
-j
-z2
-z (gzip) and -j (bzip2) enable compression in tar.
#125. What keyword is used in a shell script to begin a loop? (Specify one keyword only, without any additional information.)
enter answer here
for begins a loop in shell scripting.
#126. Which of the following commands creates an archive file work.tar from the contents of the directory ./work/?
tar --new work.tar ./work/
tar -cf work.tar ./work/
tar work > work.tar
tar work.tar < ./work/
tar -create work.tgz -content ./work/
tar -cf creates an archive from a directory.
#127. Which of the following keys can be pressed to exit less?
x
q
!
e
l
q exits the less pager.
#128. The current directory contains the following file: -rwxr-xr-x 1 root root 859688 Feb 7 08:15 test.sh Given that the file is a valid shell script, how can this script be executed? (Choose two.)
./test.sh
${test.sh}
run test.sh
bash test.sh
cmd ./test.sh
Executable scripts run via ./script or interpreter like bash script.
#129. Which of the following commands sorts the output of the command export-logs?
export-logs > sort
export-logs sort
export-logs | sort
export-logs & sort
export-logs < sort
Pipe (|) sends output of one command to another.
#130. The current directory contains the following file: -rw-r--r-- root exec 24551 Apr 2 12:36 test.sh The file contains a valid shell script, but executing this file using ./test.sh leads to this error: bash: ./test.sh: Permission denied What should be done in order to successfully execute the script?
The user executing the script should be added to the exec group.
The file's extension should be changed from .sh to .bin.
The SetUID bit should be set in the file's permissions
The script should be run using #!./test. sh instead of ./test.sh.
The execute bit should be set in the file's permissions.
Execute permission is required to run scripts.
#131. What is a Linux distribution?
A bundling of the Linux kernel, system utilities and other software.
An operating system based on Linux but incompatible to the regular Linux kernel.
The set of rules which governs the distribution of Linux kernel source code.
A set of changes to Linux which enable Linux to run on another processor architecture.
The Linux file system as seen from the root account after mounting all file systems
A distribution bundles kernel + tools + software.
#132. Which package management tool is used in Red Hat-based Linux Systems?
packagectl
portage
dpkg
rpm
apt-get
Red Hat-based systems use RPM.
#133. Which of the following programs is a graphical editor for vector graphics?
Inkscape
NGINX
MySQL
Samba
Python
Inkscape is a vector graphics editor.
#134. Where is the operating system of a Raspberry Pi stored?
On rewritable flash storage which is built into the Raspberry Pi.
On a removable SD card which is put into the Raspberry Pi.
On a Linux extension module connected to the Raspberry Pi's GPIO pins.
On the master device attached to the Raspberry Pi's IDE bus.
On a read only partition on the Raspberry Pi's firmware, next to the BIOS.
Raspberry Pi OS is stored on an SD card.
#135. What is defined by a Free Software license?
Limits on the purposes for which the licensed software may be used.
A complete list of libraries required to compile the licensed software.
Details of the technical documentation each contributor has to provide.
The programming languages which may be used to extend the licensed program.
Conditions for modifying and distributing the licensed software.
Free software licenses define usage, modification, and distribution rights.
#136. Why are web browser cookies considered dangerous?
Cookies support identification and tracking of users.
Cookies can contain and execute viruses and malware.
Cookies consume significant amounts of storage and can exhaust disk space.
Cookies are always public and accessible to anyone on the internet.
Cookies store critical data which is lost when a cookie is deleted.
Cookies can track and identify users.
#137. Which of the following are typical services offered by public cloud providers? (Choose three.)
Internet as a Service(IaaS)
Infrastructure as a Service(IaaS)
Graphics as a Service (GaaS)
Platform as a Service(PaaS)
Software as a Service (SaaS)
IaaS, PaaS, SaaS are core cloud service models.
#138. Which of the following characters in a shell prompt indicates the shell is running with root privileges?
*
&
$
#
!
# indicates root shell privileges.
#139. Which of the following commands are used to get information on the proper use of ls? (Choose two.)
option ls
man ls
manual ls
info ls
usage ls
man and info provide command documentation.
#140. What is true about a recursive directory listing?
It includes details of file system internals, such as inodes.
It includes the content of sub-directories.
It includes ownership information for the files.
It includes the permissions of the directory listed.
It includes a preview of content for each file in the directory.
Recursive listing includes subdirectories.
#141. Running the command rm Downloads leads to the following error: rm: cannot remove /Downloads/: Is a directory Which of the following commands can be used instead to remove Downloads, assuming Downloads is empty? (Choose two.)
rm -r Downloads
rem Downloads
dir -r Downloads
rmdir Downloads
undir Downloads
rmdir removes empty dirs, rm -r removes dirs recursively.
#142. Which of the following directories contains information, documentation and example configuration files for installed software packages?
/etc/defaults/
/usr/share/doc/
/usr/examples/
/var/info/
/doc/
/usr/share/doc contains documentation files.
#143. Which of the following commands adds the directory /new/dir/ to the PATH environment variable?
PATH=/new/dir: PATH
$PATH=/new/dir: $PATH
export $PATH=/new/dir: $PATH
export PATH=/new/dir: $PATH
export PATH=/new/dir: PATH
export PATH=... adds directories to executable search path.
#144. A user is currently in the directory /home/user/Downloads/ and runs the command ls ../Documents/ Assuming it exists, which directory's content is displayed?
/home/user/Downloads/Documents/
/home/Documents
/Documents/
/home/user/Documents/
/home/user/Documents/Downloads/
../ moves one directory up before accessing target.
#145. A directory contains the following three files: texts 1.txt texts 2.txt texts 3.csv Which command copies the two files ending in .txt to the /tmp/ directory?
cp *.txt /tmp/
cp ?.txt /tmp/
cp $?.txt /tmp/
cp ??.txt /tmp/
cp. \.txt /tmp/
*.txt matches all .txt files.
#146. Which of the following DNS record types hold an IP address? (Choose two.)
AAAA
NS
MX
A
CNAME
A (IPv4) and AAAA (IPv6) store IP addresses.
#147. Which of the following values could be a process ID on Linux?
21398
/bin/bash
60b503cd-019e-4300-a7be-922f074ef5ce
fff3
/sys/pid/9a14
PID is a numeric identifier like 21398.
#148. Which of the following is a protocol used for automatic IP address configuration?
LDAP
DHCP
SMTP
DNS
NFS
DHCP assigns IP addresses automatically.
#149. Which of the following devices represents a hard disk partition?
/dev/ttyS0
/dev/part0
/dev/sata0
/dev/sda/p2
/dev/sda2
/dev/sda2 represents a disk partition.
#150. Which of the following statements regarding Linux hardware drivers is correct?
Drivers are downloaded from the vendor's driver repository when a new device is attached.
Drivers are not used by Linux because the BIOS handles all access to hardware on behalf of Linux.
Drivers are either compiled into the Linux kernel or are loaded as kernel modules.
Drivers are stored on their devices and are copied by the Linux kernel when a new device is attached
Drivers are regular Linux programs which have to be run by the user who wants to use a device.
Drivers are built into kernel or loaded as modules.
#151. What can be found in the /proc/ directory?
One log file per running service.
One directory per installed program.
One directory per running process.
One file per existing user account.
One device file per hardware device.
/proc contains runtime system and process info.
#152. A new server needs to be installed to host services for a period of several years. Throughout this time, the server should receive important security updates from its Linux distribution. Which of the following Linux distributions meet these requirements? (Choose two.)
Red Hat Enterprise Linux
Debian GNU/Linux Unstable
Fedora Linux
Ubuntu Linux non-LTS
Ubuntu Linux LTS
Enterprise and LTS distros provide long-term updates.
#153. Which of the following directories must be mounted with read and write access if it resides on its own dedicated file system?
/lib
/opt
/usr
/var
/etc
/var must be writable for logs and runtime data.
#154. The ownership of the file doku.odt should be changed. The new owner is named tux. Which command accomplishes this change?
chown tux doku.odt
newuser doku.odt tux
chmod u=tux doku.odt
transfer tux: doku.odt
passwd doku.odt:tux
chown changes file ownership.
#155. What happens to a file residing outside the home directory when the file owner's account is deleted? (Choose two.)
Ownership and permissions of the file remain unchanged.
During a file system check, the file is moved to /lost +found.
The UID of the former owner is shown when listing the file's details.
The file is removed from the file system.
The user root is set as the new owner of the file.
Files keep UID; ownership shows numeric ID if user is deleted.
#156. What is true about links in a Linux file system?
A symbolic link can point to a file on another file system.
Only the root user can create hard links.
A hard link can only point to a directory and never to a file.
When the target of the symbolic link is moved, the link is automatically updated.
A symbolic link can only point to a file and not to a directory.
Symbolic links can point across filesystems.
#157. Which files are the source of the information in the following output? (Choose two.) uid=1000 (bob) gid=1000 (bob) groups=1000 (bob), 10 (wheel), 150 (wireshark), 989 (docker), 1001 (libvirt)
/home/index
/etc/id
/etc/group
/etc/passwd
/var/db/users
/etc/passwd and /etc/group define users and groups.
#158. Which of the following tasks can the command passwd accomplish? (Choose two.)
Create a new user account.
Change a user's password.
Create a new user group.
Change a user's username.
Lock a user account.
passwd changes passwords and can lock accounts.
#159. What is true about the su command?
It is the default shell of the root account.
It can only be used by the user root.
It changes the name of the main administrator account.
It runs a shell or command as another user.
It locks the root account in specific time frames.
su runs commands as another user.
#160. What parameter of ls prints a recursive listing of a directory's content? (Specify ONLY the option name without any values or parameters.)
enter answer here
-R enables recursive listing in ls.
#161. Most commands on Linux can display information on their usage. How can this information typically be displayed?
By running the command with the option /doc or /documentation.
By running the command with the option -h or --help.
By running the command with the option ?! or ?=!.
By running the command with the option -m or --manpage.
By running the command with the option /? or /??.
-h or --help displays usage information for commands.
#162. Which of the following commands shows the absolute path to the current working directory?
ls -l
cd ..
cd ~/home
pwd
who
pwd prints the current working directory.
#163. Which of the following commands output the content of the file Texts 2.txt? (Choose two.)
cat 'Texts\ 2.txt'
cat -- Texts 2.txt
cat Texts\ 2.txt
cat 'Texts 2.txt'
cat |Texts 2.txt|
Spaces in filenames require quotes or escaping with \.
#164. Which command displays file names only and no additional information?
ls -l
ls -a
ls -alh
ls -lh
ls -nl
ls without -l shows only filenames (ls -a still counts).
#165. What is the purpose of the PATH environment variable?
It contains the absolute path to the current directory.
It allows the execution of commands without the need to know the location of the executable.
It increases security by preventing commands from running in certain locations.
It specifies the location of a user's home directory.
It indicates the location of the default shell to be used when a user logs in.
PATH allows running commands without specifying full path.
#166. Which of the following commands sets the variable USERNAME to the value bob?
set USERNAME bob
USERNAME=bob
var USERNAME=bob
$USERNAME==bob
USERNAME<=bob
Variables are assigned with NAME=value syntax.
#167. What command displays manual pages? (Specify ONLY the command without any path or parameters.)
enter answer here
man displays manual pages.
#168. Which command copies the contents of the directory /etc/, including all sub-directories, to /root/?
cp -R /etc/*.* /root
rcp /etc/* /root
copy /etc /root
cp -v /etc/* /root
cp -r /etc/* /root
cp -r copies directories recursively.
#169. Which of the following commands puts the lines of the file data.csv into alphabetical order?
wc -s data.csv
abc data.csv
sort data.csv
a..z data.csv
grep --sort data.csv
sort orders lines alphabetically.
#170. Which of the following examples shows the general structure of a for loop in a shell script?
for file in *.txt do echo $i done
for *.txt ( echo $i )
foreach @{file} { echo $i }
for *.txt as file => echo $file
for ls *.txt exec {} \;
for ... do ... done is the correct loop structure.
#171. Which operator in a regular expression matches the preceding character either zero or one time?
$
%
?
*
+
? matches zero or one occurrence in regex.
#172. The file script.sh in the current directory contains the following content: #!/bin/bash echo $MYVAR The following commands are used to execute this script: MYVAR=value - ./script.sh The result is an empty line instead of the content of the variable MYVAR. How should MYVAR be set in order to make script.sh display the content of MYVAR?
!MYVAR=value
$MYVAR=value
env MYVAR=value
MYVAR=value
export MYVAR=value
Variables must be exported to be available to scripts.
#173. What is the return value of a shell script after successful execution?
1
-1
0
255
-255
Exit code 0 means success.
#174. Which of the following commands creates the ZIP archive poems.zip containing all files in the current directory whose names end in .txt?
zip cfz poems.zip *.txt
cat *.txt | zip poems.zip
zcat *.txt poems.zip
zip *.txt > poems.zip
zip poems.zip *.txt
zip creates archives from files.
#175. Which of the following statements are true regarding a typical shell script? (Choose two.)
It is located in /usr/local/scripts/.
It has the executable permission bit set.
It is located in /etc/bash/scripts/.
It is compiled into a binary file compatible with the current machine architecture.
It starts with the two character sequence #!
Scripts must be executable and start with #!.
#176. Which of the following commands extracts the contents of the compressed archive file1.tar.gz?
tar -czf file1.tar.gz
tar --extract file1.tar.gz
detar file1.tar.gz
tar -xzf file1.tar.gz
ztar file1.tar.gz
tar -xzf extracts gzip-compressed archives.
#177. Which of the following commands finds all lines in the file operating-systems.txt which contain the term linux, regardless of the case?
less -i linux operating-systems.txt
grep -i linux operating-systems.txt
igrep linux operating-systems.txt
cut [Ll] [Ii] [Nn] [Uu] [Xx] operating-systems.txt
cut linux operating-systems.txt
grep -i performs case-insensitive search.
#178. Which of the following programs are web servers? (Choose two.)
NGINX
Postfix
Apache HTTPD
Dovecot
Curl
NGINX and Apache are web servers.
#179. Which of the following Linux Distributions is derived from Red Hat Enterprise Linux?
Ubuntu
openSUSE
Debian
Raspbian
CentOS
CentOS is derived from Red Hat Enterprise Linux.
#180. Which of the following statements is true about Free Software?
It may be modified by anyone using it.
It must always be available free of charge.
It only runs on Linux.
It is developed by volunteers only.
It is only distributed as a compiled binary.
Free software can be modified and redistributed.
#181. What are the differences between a private web browser window and a regular web browser window? (Choose three.)
Private web browser windows do not allow printing or storing websites.
Private web browser windows do not support logins into websites.
Private web browser windows do not keep records in the browser history.
Private web browser windows do not store cookies persistently.
Private web browser windows do not send regular stored cookies.
Private mode disables history, persistent cookies, and stored sessions.
#182. What is the preferred source for the installation of new applications in a Linux based operating system?
The vendor's website
A retail store
A CD-ROM disk
The vendor's version management system
The distribution's package repository
Package repositories are the safest installation source.
#183. When typing a long command line at the shell, what single character can be used to split a command across multiple lines?
enter answer here
\ allows line continuation in shell.
#184. Which statements about the directory /etc/skel are correct? (Choose TWO answers)
The files from the directory are copied to the home directory of the new user when starting the system.
The personal settings of root are in this directory.
The directory contains the global settings for the Linux system.
The directory contains a default set of configuration files used by the useradd command.
The files from the directory are copied to the home directory of a new user when the account is created.
/etc/skel provides default files for new users.
#185. How could one search for the file foo.txt under the directory /home?
find /home -name foo.txt
find /home foo.txt
search /home -file foo.txt
search /home foo.txt
find /home -file foo.txt
find /home -name foo.txt searches recursively.
#186. What permissions are set on a file with the command chmod 654 file.txt?
-rwxrw---x
drw-r-xr--
--wxr-x--x
d--wxr-x--
-rw-r-xr—
654 = rw- r-x r-- permissions.
#187. Which of the following is a technology used to connect a hard drive directly to a computer's motherboard?
VGA
DSL
Ethernet
PCI
SATA
SATA connects storage devices to the motherboard.
#188. Which one of the following statements concerning Linux passwords is true?
Passwords may never start with a non-letter.
Passwords may be at most six characters long.
Passwords are only stored in encrypted form.
Users cannot change their password once it has been set.
All passwords can be decrypted using the system administrator's master password.
Passwords are stored hashed (encrypted form).
#189. What are the differences between hard disk drives and solid state disks? (Choose two.)
Solid state disks provide faster access to stored data than hard disks.
Hard disks can fail due to physical damage, while solid state disks cannot fail.
/dev/sda is a hard disk device while /dev/ssda is a solid state disk.
Hard disks have a motor and moving parts, solid state disks do not.
Solid state disks can store many times as much data as hard disk drives.
SSDs are faster and have no moving parts unlike HDDs.
#190. How is a new Linux computing instance provisioned in an laaS cloud?
After buying a Linux distribution, its vendor delivers it to a cloud instance.
A provider-specific configuration file describing the desired installation is uploaded to the cloud provider.
The installation has to be prepared in a local virtual machine which is then copied to the cloud.
The standard Linux installer has to be run through a remote console.
The cloud hosting organization provides a set of pre-prepared images of popular Linux distributions.
Cloud instances are typically provisioned using configuration definitions.
#191. Which of the following outputs comes from the command free?
free outputs memory usage statistics (RAM and swap).
#192. A directory contains the following files: a.txt b.txt c.cav What would be the output of the following shell script? for file in *.txt do echo $file done
c.cav
*.txt
a. txt b. txt
a b
a.txt
*.txt matches a.txt and b.txt, so both are printed.