Font size
Worksheetsلينكس
Total questions: 149
Worksheet time: 1hrs 23mins
The Samba application is a
Security Server
File Server
Mail Server
Web Server
Which of the following are examples of desktop software?
(choose two)
Music player
File share
Web browser
Compiler
Web server
If you wanted to set up a blog, which software would be most helpful?
Samba
MySQL
Postfix
Dovecot
WordPress
Which of the following pieces of software deal with file sharing?
(choose three)
X-Windows
PostgreSQL
Netatalk
Samba
NFS
If you wanted to create and print an invoice, which software could you use?
Evolution
LibreOffice
GNOME
Compiz
Firefox
POP and IMAP are related to
Serving web pages
Reading and writing music
Letting users log in to multiple servers with 1 set of credentials
Sharing files
When a computer boots, it can get its network information through
LDAP
DNS
DHCP
SMTP
X11
Which of the following are examples of text editors?
(choose four)
nano
Yum
pico
vim
emacs
A package manager (choose two)
Downloads software from the Internet
Keeps track of which files belong to which packages
Can optionally repartition your disk to make room for Linux
Performs a fresh install of Linux
Emails you when software is out of date
An interpreted programming language:
(choose two)
Takes fewer resources to run than a compiled language
Is converted into machine specific instructions as the program runs
Requires a linking step but no compilation step
Tends to offer more features than compiled languages
Requires a compilation step but no linking step
Which of the following are true about compiled programming languages?
Ruby is a compiled language
Compiled languages are great for system administration tasks like scripting
C is a compiled language
Perl is a compiled language
A programmer is usually more productive when using a compiled language
Which package manager is used in Fedora, a Red Hat derived system?
tar
bash
yum
vim
apt-get
The Linux shell:
(choose three)
Is customizable
Has a built-in text editor
Allows you to launch programs
Has a scripting language
Is responsible for tracking the location of configuration files
Which application would you use to edit and piece together sound files to make a podcast?
Audiolicious
GIMP
Thunderbird
Bash
Audacity
The two main families of Linux shells are:
(choose two)
Emacs
C Shell
Bourne Shell
Python Shell
Korn shell
Which server software would you use to create a company directory that you could search and authenticate against?
bind
OpenLDAP
Samba
ISC DHCP
Netatalk
A Mail Transfer Agent’s primary purpose is to:
Serve email to end clients
Deliver mail between servers
Manage the end user’s inbox
Filter out spam
Act as a gateway between faxes and email
Which of the following are examples of a web server?
(choose two)
NFS
postfix
WordPress
Nginx
Apache
If you wanted to let a Linux machine share files with Windows clients and servers, you would use:
Netatalk
DNS
Samba
NFS
bind
Virtualization means:
A user can connect to a server over the network and use a virtual console
Many users can share one hard drive
A machine can swap memory to disk
A single host can be split up into multiple guests
Two users get different memory spaces on the same machine
In virtualization, what are the host and guest?
(Choose two)
The terms can be used interchangeably
A guest is a virtual machine
A host is a virtual machine
The host is the machine that runs the virtual machines
The guest is the machine that runs the virtual machines
Which of the following are traits of cloud computing?
(choose two)
You don’t have to worry about performance any more
Resources can be accessed from anywhere over a network
Scales IT resources so you pay for what you use
You own the hardware but pay for it over time
Only Linux works in cloud computing
If you wanted to write a report that was to be printed, you would probably use:
A wiki
Adobe Flash
Firefox
Chrome
LibreOffice
To protect your privacy online, you can configure your computer to check for updates periodically.
True or False?
True
False
Which of the following is a tool that helps you anonymize your Internet browsing?
Web proxy
Tor Browser
Iptables
AnonFirefox
CookieCleaner
Cloud computing is:
Is made possible by faster internet speeds
Is useful for both business and home users
Allows users in different geographical regions to work together in real time
Requires fewer resources because systems are shared among many users
All are correct
The term for individual computers running multiple systems at the same time is:
MultiRun
Cloud priority
Distribution
Virtualization
Googleization
Which of the following are traits of a multiuser operating system?
(choose three)
Many users can log in simultaneously with a unique account
Users can protect their information from other users
Resources are shared between users
Each user can only log in once per day
An administrative user gets a dedicated CPU
If you want to store logins and passwords for different websites in a secure manner, you could use:
A text file in your home directory
A LibreOffice document
A sticky note on your monitor
KeePassX
In a spiral bound notebook in your file cabinet
Two components that provide the ability to implement a firewall include:
(choose two)
iptables
gufw
ifconfig
Cerberus
ipfw
What are tradeoffs of increasing the level of privacy you have in your web browser?
(choose two)
You may have to explicitly permit some cookies to be saved
Sites may not work properly
You may get viruses
Websites may load slower
Images won’t load properly
Social network “like” buttons can track your activity across the Internet.
True or False?
True
False
Which of the following are properties of a strong password?
(choose three)
At least 10 characters long
Based on easy to remember items like birthdays
Includes symbols
Long so that it can be reused on multiple sites
A mix of upper and lower case
What can be done to prevent unauthorized users from accessing your computer remotely?
(choose two)
Block third party cookies
Turn on a firewall
Block all cookies
Use strong passwords on all user accounts
Don’t use wireless networks – only wired
In graphical mode, you can get to a shell by running which applications?
(choose two)
Terminal
Gbash
console
Xterm
Guiterm
Which environment variable contains a list of directories that is searched for commands to execute?
PATH
PS1
PS2
EXEC
Select the command that can report the location of a command:
what
which
where
A pair of single quotes ( ‘ ) will prevent the shell from interpreting any metacharacter.
True or False?
True
False
A pair of double quotes (” ) will prevent the shell from interpreting any metacharacter.
True or False?
True
False
Using a pair of back quotes ( ` ) will cause a shell to execute the back-quoted text as a command and substitute the output back into the original command.
True or False?
True
False
The semicolon (;) can be used to separate multiple commands to be executed in order.
True or False?
True
False
The double ampersand characters (&& ) are used to separate commands to be executed conditionally, where if the command to the left of the ampersands fails, then the command to the right of the ampersands will be executed.
True or False?
True
False
To be able to output messages to the screen, use the _______ command:
echo
display
type
The _______ command will print a list of the commands that you’ve previously executed.
list
eval
history
exec
To execute the same command as previously executed five commands ago, you would type:
@-5
!5
!-5
&5
The shell program interprets the commands you type into the terminal into instructions that the Linux operating system can execute.
True or False?
True
False
The acronym CLI stands for:
Computer Line Interface
Command Line Interpreter
Command Line Interface
Computer Link Interpreter
What one character treats the character that follows it as if it was surrounded by single quotes?
/
#
%
\
The echo command:
Copies variables from one to another
Tests a variable for duplication
Is used for variable assignment
Is used to output text to the console
Duplicates the input stream to the output stream
The most common shell used for Linux distributions is the ________ shell.
Fish
Bash
Tsch
Zsh
HOME is an example of _________.
An environment variable
A path variable
A local variable
An internal command
An alias
What is the standard option to provide a command line program to view its documentation?
-h
–info
–help
–doc
The command man -k is the same as the command apropos.
True or False?
True
False
The whatis command is the same as man -w.
False
True
The directory where additional documentation for software packages most likely can be found is:
/usr/software/doc
/var/lib/doc
/usr/share/doc
/var/share/doc
Which two pager commands are used by the man command to control movement within the document? (choose two)
grep
less
page
more
Commands typically executed by a user are covered in what section of the manual?
5
3
2
1
To search the man page sections for the keyword example, which of the following command lines could you execute?
(choose two)
man -k example
apropos example
man -f example
whatis example
The statement that describes the difference between a man page and an info page is:
The man page is like a guide; the info page is a more concise reference.
The info page is like a guide; a man page is a more concise reference.
The man page is a long detailed reference; the info page is very terse.
There is very little difference between them.
If you are reading the synopsis of a command from a man page, then items in square brackets are:
Required arguments
Comments
Optional
Required options
The following sections commonly appear on a man page:
(choose three)
NAME
LICENSE
DESCRIPTION
SYNOPSIS
Section 5 of the manual pages covers:
System administration commands
Games
User commands
File Formats
To start searching a man page, the first key you press is:
f
/
s
!
In order to exit viewing a man page, press:
q
z
x
y
To get help on using the info command, execute:
(choose two)
man info
info -q
info info
help info
To get help while using the info command, press:
g
A
Shift+H
Shift+z
To exit the info page, press:
Q
x
z
x
When interpreting the SYNOPSIS of a command found on a man page, the “|” means:
The items it separates can be used together
The items it separates cannot be used together
The _____ command is normally executed daily to update the database of all files that are on the system.
find
locate
search
updatedb
The _____ command is normally executed to search for a command or man page.
updatedb
whereis
find
man -k
The _____ command can be used to find any file, not just commands or man pages.
apropos
whereis
whatis
locate
The info command merges all available documentation into a single “book”. True or False?
True
False
Section 9 of man pages relates to what?
Library Calls
Games
Kernel Routines
System Calls
Miscellaneous
The man command searches each of the sections in order until it finds a match.
True or False?
True
False
The whatis command will only return the first result for which section a man page is stored in.
True or False?
True
False
Hidden files are files that begin with what character?
A plus (+)
An asterisk (*)
A dash (-)
A period (.)
What option for the ls command will display all files, including hidden files?
-a
-L
-H
-w
The top-level directory on a Linux system is represented as:
/home
C:
/root
/
Is the following path absolute or relative?
/etc/ppp
Absolute
Relative
Is the following path absolute or relative?
sysadmin/Documents
Relative
Absolute
Is the following path absolute or relative?
../../home/sysadmin
Absolute
Relative
The tilde (~) is used to represent:
Any two single characters
Nothing; it has no special meaning
The directory above the current working directory
A user’s home directory
Which of the following commands can be used to access the home directory of the user “bob” while logged in as root? (choose two)
cd &&
cd /home/bob
cd ~bob
~bob
The double dot (..) can be used with the cd command to represent:
A user’s home directory.
Any two single characters
Nothing; it has no special meaning.
The directory above the current working directory
The cd command by itself will take you to what directory?
None; it is not a valid command
The system root directory
Your home directory
The directory above the current working directory
What command will allow you to change your current working directory?
list
chdir
ls
cd
The double dot (..) can be used to represent the directory…
…below the current directory.
…above the current directory.
…with any two single numbers.
…above the current directory only when using the cd command.
The ls command without options or arguments…
…prompts for a directory to list.
…generates an error as this command requires arguments.
…lists the contents of a user’s home directory.
…lists the contents of the current directory.
The first character in a long listing (ls -l) indicates:
The permissions
The owner
If something is a file, directory, or symbolic link
The size
Which option for the ls command, when used in conjunction with the -l option, will display human-readable file sizes?
-S
-H
-h
-M
Which of the following commands will prevent any aliased options to the ls command?
%ls
/ls
`ls
\ls
The ls command color codes results by default. True or False?
True
False
The command ls -S will sort files:
By modification date, newest to oldest
By size, largest to smallest
By number of symlinks, largest to smallest
By size, smallest to largest
When using the cp command, you must provide both a source and a destination.
True or False?
True
False
Which option(s) can be used to prevent cp from overwriting an existing file?
(choose two)
-z
-n
-N
-i
The command rm -r will…
remove a directory along with any files or subdirectories.
generate an error; -r isn’t a valid option.
remove only empty directories.
prompt for each confirmation before deleting each file in a directory.
Which option can be used with the rm command to prompt before deleting?
A
-P
l
-i
The rm command can delete multiple files at once.
True or False?
True
False
Which of the following commands can be used to rename a file?
cp
rm
mv
name
The touch command can be used to:
(choose two)
Update the timestamp of existing files
Change ownership of a file
Create new files
Change a file’s name
Which of the following are glob characters?
(choose three)
The square brackets “[” and “]”
The question mark “?”
The dash character “-“
The asterisk “*”
The main purpose of using glob characters is to be able to provide a list of filenames to a command.
True or False?
True
False
The asterisk character is used to represent zero or more of any character in a filename.
True or False?
True
False
Which of these commands will return /etc/gai.conf /etc/pam.conf /etc/ucf.conf?
(choose two)
ls /etc/???.????
echo /etc/???.*f
echo /etc/*?.*o?
ls /etc/p???.**
Brackets cannot be used to a represent a range of characters.
True or False?
True
False
Which command would list files that do not begin with a “T” or a “W”?
echo /etc/*[TW!]
echo /etc/!TW
echo /etc/[!TW]*
echo /etc/[*TW]!
Compression of a file works by:
Eliminating gaps within the file
Consolidating multiple files into one
Removing redundant information
Storing most of the data on removable media and just leaving a pointer
Removing the high order bit from each byte
In general, for which of the following would you want to use lossless compression?
An mp3 audio file
An encrypted email
A JPEG image
A log file
A movie
Lossy compression: (choose three)
Usually results better compression than lossless
Is often used with images
Is often used with documents
Decompresses to an identical version as the original
Sacrifices some quality
You type gzip myfile.tar. What happens?
(choose two)
myfile.tar is unarchived into the current directory
An error; you forgot to pass the name of the output file
myfile.tar.gz holds a compressed version of myfile.tar
An error; you forgot to specify the file with -f
myfile.tar is removed
How would you obtain output similar to the following?
compressed uncompressed ratio uncompressed_name
278168 1016950 72.6% tags
gzip –l tags
gunzip –t tags
file tags
Which command would you use to archive the Documents directory and compress it with bzip2 compression?
tar –fzc Documents documents.tbz
tar –cf Documents documents.tbz
tar –cjf Documents
tar –cjf documents.tbz Documents
tar –czf documents.tbz
Which flag would you pass to tar in order to have it make a new archive?
-t
-c
-n
-x
-j
Which command will show what is inside the compressed tarball with a name of foo.tar.gz?
tar –tjf foo.tar.gz
tar –lf foo.tar.gz
tar –tf foo.tar.gz
tar –xf foo.tar.gz
tar –tzf foo.tar.gz
In the command tar -cvjf foo.tbz a b c, what are a, b, and c?
Nothing; -cvjf only expects one parameter
File names to be added to the archive
a is the directory that will be prepended to files; b and c are files inside it
Matching operators; anything starting with a, b, or c will be added
Extra flags passed to tar
Given the command tar –cvjf homedirs.tbz /home, which of the following are true?
(choose two)
Only files starting with /home will be extracted from the archive
The command will print out each filename as it is processed
The /home directory will be restored with the contents of homedirs.tbz
Files that are present in the archive might overwrite files in /home
The output file will be compressed
You archived your users’ directories into a file called backup.tar.gz. You then view the archive and see the filenames follow this convention:
home/username/somefile
How will you extract just the files for the user called fred?
tar –xzf backup.tar.gz home/fred/
tar –tjf backup.tar.gz /home/fred
tar –xjf backup.tar.gz home/fred/
tar –xzf backup.tar.gz fred
tar –tzf /home/fred < backup.tar.gz
Which of the following commands will create a zipfile with the contents of your Documents directory?
zip –f mydocs.zip Documents
zip -r mydocs.zip Documents
zip –c mydocs.zip Documents
zip mydocs.zip Documents
zip -cf mydocs.zip Documents
Given a file called documents.zip, how can you see what’s in it without extracting the files?
zip -lf documents.zip
unzip -l documents.zip
unzip –list documents.zip
zip -l documents.zip
showzip documents.zip
Given a file called documents.zip, how can you extract just the files under ProjectX?
unzip documents.zip ProjectX/*
unzip documents.zip | grep ProjectX
unzip documents.zip ProjectX
zip -x documents.zip ProjectX
unzip -t documents.zip ProjectX
You try to compress a file that is already compressed. Which of the following statements is true?
The file will not be compressed any further than it already was
The compression algorithm needs to be set to the “currently compressed” mode for it to be compressed further
The file changed while you were compressing it
The file will be deleted
The file will actually be uncompressed
Which of the following commands can be used to compress a file?
(choose three)
bunzip2
cat
zip
bzip2
gzip
The three main modes of tar are:
(choose three)
List
Create
Compress
Copy
Extract
In the command tar -czf foo.tar.gz bar, what is the purpose of the f flag?
Tells tar to copy only files, and not directories
Tells tar to read from the file that follows the flag
Tells tar to write to the file that follows the flag
Tells tar to print the name of each file as it is processed
Specifies extra compression is to be used
Which two commands do the same thing?
(choose two)
tar -czf foo.tar.gz foo
tar -tzf foo.tar.gz
tar -c foo | gzip > foo.tar.gz
tar -x foo | gzip
tar -xzf foo.tar.gz
Which two programs use the Lempel-Ziv-Markov chain algorithm?
(choose two)
xz
lossless
lossy
bzip
gzip
By default, the zip command replaces uncompressed files with compressed files.
True or False?
True
False
Error messages generated by commands are sent where by default?
STDERR
STDIN
Log files
STDOUT
A successful command may, or may not print output to STDOUT. True or False?
True
False
Which of the following commands will direct error messages to the file, error.log?
ls /root >> error.log
ls /root > error.log
ls /root 2> error.log
ls /root $> error.log
A pipe allows you to…
…send the same input to multiple commands.
…type multiple commands at one prompt.
…send the output of one command to another.
…send the output of a command to a file.
Channel 2 is:
STDOUT
STDALL
STDERR
STDIN
Which of the following commands will append its output to output.file?
echo Testing >> output.file
echo Testing > output.file
output.file < echo Testing
echo Testing -> output.file
Which command(s) can be used to sort the lines of list.file alphabetically and display it on the screen?
(choose two)
sort < list.file
cat list.file >> sort
echo list.file > sort
cat list.file | sort
Which option of the head command will display only the first five lines of a file?
No option needed; head displays only five lines by default.
-n
-l 5
-n 5
The grep command…
…will display all the lines that begin with the specified Regular Expression.
…will display all the lines in a file containing the specified Regular Expression.
…will display the line numbers in a file that contain a specified Regular Expression.
…is not case sensitive.
The grep command can be used with glob characters. True or False?
True
False
Which of the following commands will display only lines that begin with start?
grep \start file.txt
grep $start file.txt
grep *start file.txt
grep ^start file.txt
Which of the following commands will display only lines that begin with test?
grep $test* file.txt
grep *test file.txt
grep &test file.txt
grep ^test file.txt
Which of the following commands will display lines that contain either start or end?
egrep ‘start|end’ file.txt
egrep (start|end) file.txt
egrep start end file.txt
egrep start&end file.txt
Which of the following commands can be used to scroll through a text file?
(choose two)
some
more
cat
less
Which option for the cut command is used to specify a delimiter?
-D
-f
=
-d
Which option for the cut command is used to specify the field?
-d
#
-D
-f
Which option for the wc command will print the number of lines in a file?
-w
-l
-L
-C
Which option for the wc command will print the total number of words in a file?
-l
-C
-L
-w
Which command can be used to print line numbers?
num
nl
ln
sort
The command echo "text" > file.txt will create file.txt if it does not already exist.
True or False?
True
False
The command echo "text" > file.txt will not overwrite file.txt if it already exists.
True or False?
True
False
The command echo "text" >> file.txt will not overwrite file.txt if it already exists.
True or False?
True
False
