You are on page 1of 42

1

Linux Essentials – Chapter 01 Exam Answers 2019


1. One of the jobs of the kernel is to:
o Transfer mail from one machine to another
o Manage the system’s resources*
o Load the operating system after the computer is turned on
o Turn source code into machine code
2. Unix is: (choose two)
o A distribution of Linux
o A trademark*
o A text editor
o An operating system*
o A type of hardware
3. Linux is written in:
o C*
o .NET
o Java
o Perl
o C++
4. Source code refers to:
o The interface that software uses to talk to the kernel
o The license that dictates how you may use and share the software
o The version of a program that the computer runs on the CPU
o A human readable version of computer software*
5. Open source means: (choose two)
o You must support the software you share
o You can view the software’s source code*
o You cannot charge anything for the software
o You must share your changes
o You can modify the software’s source code*
6. Most of the tools that are part of Linux systems come from:
o Google
o Red Hat and Debian
o The Open Source Initiative
o The Linux foundation
o The GNU project*
7. The Linux platform that runs on mobile phones is called:
o IOS
o Teldroid
o LinuxMobile
o Android*
o MicroLinux
8. What does a distribution provide to add and remove software from the
system?
o Bash
2

o Application Programming Interface (API)


o Partitioning tool
o Package manager*
o Compiler
9. The bootloader’s job is to:
o Load the application into memory
o Assign initial settings such as network address
o Install software from the Internet or removable media
o Perform the initial installation of the kernel to hard drive
o Load the kernel after the computer is powered on*
10. UNIX was originally invented at:
o Stanford University
o AT&T Bell Labs*
o Berkeley University
o Xerox PARC
o Bangalore University
11. A license where you don’t have access to the source code is called:
o Impaired source
o Closed source*
o Open source
o Sourceless
12. Which distributions are made by, or clones of, Red Hat? (choose two)
o Fedora*
o Ubuntu
o Slackware
o Debian
o CentOS*
13. Ubuntu is derived from which distribution?
o Scientific Linux
o Slackware
o Fedora
o Debian*
o Red Hat Enterprise Linux
14. Open source licenses differ, but generally agree that: (choose two)
o You must redistribute your changes
o You are not allowed to sell the software
o You should be able modify the software as you wish*
o You should have access to the source code of software*
15. Applications make requests to the kernel and receive resources, such as
memory, CPU, and disk in return.
True or False?
o True*
o False
16. The most important consideration when choosing an operating system is:
o What the computer will do*
o The licensing model of the operating system
3

o The operating system’s mascot


o How much performance is needed
o Whether or not it is cloud-friendly
17. Linux is not Unix because:
o It’s not good enough
o It’s free
o It’s not made by the Open Group
o There are too many distributions
o It hasn’t undergone certification*
18. A release cycle:
o Is always 6 months
o Doesn’t matter in an Open Source environment
o Describes how long the software will be supported for
o Describes how often updates to the software come out*
o Only applies to software you pay for
19. A maintenance cycle:
o Should be long so that you have time before you need to upgrade
o Only has meaning for paid software
o Should be short so you always have the freshest releases
o Describes how often updates for software come out
o Describes how long a version of software will be supported*
20. If a software release is in a state in that it has many new features that have
not been rigorously tested, it is typically referred to as beta software.True or
False?
o True*
o False
21. Software is backward compatible if:
o It still supports old file formats or applications*
o It can be upgraded without downtime
o If the next version still works the same way
o It works across Linux/Mac/Windows
o People still use old versions
22. Apple’s OS X is: (choose three)
o Derived from Linux
o Only compatible with Apple hardware*
o Primarily used to manage network services
o Certified as UNIX compatible*
o Derived from FreeBSD*
o Able to natively run Windows binaries
23. Microsoft Windows: (choose three)
o Has a new desktop version every year.
o Has a short maintenance cycle
o Comes in desktop and server variants*
o Has built in virtualization*
o Has a Linux compatibility mode
o Has powerful scripting capabilities*
4

24. Other commercial Unixes: (choose two)


o Are tied to their vendor’s hardware*
o Do not run the GNU tools
o Are UNIX certified*
o Are almost obsolete
o Use completely different commands than Linux
25. When choosing a distribution of Linux, you should consider: (choose five)
o Which management tools are provided by the distribution*
o Whether or not the distribution is under active development*
o The maintenance cycle of the distribution*
o Popularity on social media.
o If you need support on the distribution itself*
o Which distributions are supported by the software you need to run*

Linux Essentials – Chapter 02 Exam Answers 2019


1. The Samba application is a:
o File Server*
o Web Server
o Security Server
o Mail Server
2. Which of the following are examples of desktop software? (choose two)
o Web server
o File share
o Web browser*
o Music player*
o Compiler
3. If you wanted to set up a blog, which software would be most helpful?
o WordPress*
o MySQL
o Samba
o Postfix
o Dovecot
4. Which of the following pieces of software deal with file sharing? (choose
three)
o Netatalk*
o NFS*
o X-Windows
o Samba*
o PostgreSQL
5. If you wanted to create and print an invoice, which software could you use?
o Evolution
o Firefox
o GNOME
o Compiz
5

o LibreOffice*
6. POP and IMAP are related to:
o Sharing files
o Email*
o Reading and writing music
o Serving web pages
o Letting users log in to multiple servers with 1 set of credentials
7. When a computer boots, it can get its network information through:
o X11
o DNS
o DHCP*
o LDAP
o SMTP
8. Which of the following are examples of text editors? (choose four)
o pico*
o emacs*
o yum
o vim*
o nano*
9. A package manager: (choose two)
o Downloads software from the Internet*
o Emails you when software is out of date
o Keeps track of which files belong to which packages*
o Can optionally repartition your disk to make room for Linux
o Performs a fresh install of Linux
10. An interpreted programming language: (choose two)
o Takes fewer resources to run than a compiled language
o Tends to offer more features than compiled languages*
o Is converted into machine specific instructions as the program runs*
o Requires a linking step but no compilation step
o Requires a compilation step but no linking step
11. Which of the following are true about compiled programming languages?
o Compiled languages are great for system administration tasks like
scripting
o C is a compiled language*
o Ruby is a compiled language
o Perl is a compiled language
o A programmer is usually more productive when using a compiled
language
12. Which package manager is used in Fedora, a Red Hat derived system?
o vim
o tar
o apt-get
o bash
o yum*
13. The Linux shell: (choose three)
6

o Has a scripting language*


o Has a built in text editor
o Is responsible for tracking the location of configuration files
o Is customizable*
o Allows you to launch programs*
14. Which application would you use to edit and piece together sound files to
make podcast?
o GIMP
o Bash
o Thunderbird
o Audacity*
o Audiolicious
15. The two main families of Linux shells are: (choose two)
o Python Shell
o Korn shell
o emacs
o Bourne Shell*
o C Shell*
16. Which server software would you use to create a company directory that you
could search and authenticate against?
o ISC DHCP
o Netatalk
o OpenLDAP*
o bind
o Samba
17. A Mail Transfer Agent’s primary purpose is to:
o Filter out spam
o Manage the end user’s inbox
o Serve email to end clients
o Deliver mail between servers*
o Act as a gateway between faxes and email
18. Which of the following are examples of a web server? (choose two)
o postfix
o NFS
o Nginx*
o WordPress
o Apache*
19. If you wanted to let a Linux machine share files with Windows clients and
servers, you would use:
o Netatalk
o DNS
o Samba*
o NFS
o bind
20. Richard Stallman is associated with:
o The Open Source Initiative
7

o Microsoft
o The Free Software Foundation*
o BSD Unix
o The Apache foundation
21. A “copyleft provision” in a software license means:
o If you redistribute the software, you must distribute the source to any
changes you make*
o You may not link against third party closed source software
o You must provide free copies of the software if you use it
o You must provide support for your modifications
o You give up your copyright to the software
22. The largest difference between the GPLv2 and BSD licenses is:
o GPLv2 is not approved by the OSI
o Only BSD allows commercial use
o Nothing, they are virtually identical
o BSD has no copyleft provision*
o GPLv2 requires assigning copyright to the FSF
23. The Free Software Foundation believes that: (choose two)
o Software should be free to modify*
o No money should ever change hands
o Software should be free to share*
o People should write software with no expectation of making money
o Software should not have copyright
24. Which of the following licenses was made by the FSF?
o MIT
o BSD
o GPLv3*
o Creative Commons
o Apache
25. A permissive free software license: (choose two)
o Means you can use the software for anything you want*
o Does not allow the software to be locked to certain hardware
o Places no restrictions on sharing modifications*
o Places the software in the public domain
o Requires you share software changes but not binaries
26. Linux is distributed under which license?
o Linux Foundation
o MIT
o BSD
o GPLv2*
o GPLv3
27. Who founded the Open Source Initiative? (choose two)
o Richard Stallman
o University of California at Berkeley
o Eric Raymond*
o Linus Torvalds
8

o Bruce Perens*
28. A generic term for Open Source and Free Software is:
o SLOFF
o Libre Software
o FLOSS*
o GPL
o OS/FS
29. Which are examples of permissive software licenses? (choose two)
o GPLv3
o GPLv2
o LGPLv3
o MIT*
o BSD*
30. What does it mean when a work is placed in the public domain?
o The work was done by a government agency
o The author has died
o You must redistribute changes to the software
o You may not use the work for commercial purposes
o The author has relinquished the copyright on the work*
31. Creative Commons licenses allow you to: (choose three)
o Specify whether or not people may distribute changes*
o Receive royalties on the use of the work
o Specify whether or not changes must be shared*
o Allow or disallow commercial use*
o Get a veto on where the work is used
32. If a podcast is licensed under the CC BY-ND license, you may: (choose two)
o Use an interview or song from it for your own podcast
o Post it to your website*
o Add ads to it and post it to your website.
o Share it as long as you give credit to the author*
o Sell it as part of a compilation
33. How can you make money from open source software? (choose three)
o Charge a yearly fee for the right to use the software
o Take payments for fixing bugs*
o Sell hardware that’s built to work with the software*
o Provide paid consulting services for users*
o Unlock premium features for people that pay
34. To place software under an open source license, you must give up your
copyright.True or False?
o True
o False*
35. The difference between the GPL and LGPL licenses are:
o LGPL is shorter than GPL
o LGPL allows linking to non GPLed software*
o LGPL applies to web services
o LGPL was made by the OSI while GPL was made by the FSF
9

o LGPL allows you to distribute the software in binary-only form


36. Permissive free software licenses: (choose three)
o Are not approved by the OSI
o Are not approved by the FSF*
o Include the GPLv2 and BSD
o Can allow software to be used inside closed source software*
o Don’t have a copyleft provision*
37. The Creative Commons version of Public Domain licensing is:
o Attribution-NonCommercial-ShareAlike
o Attribution-NonCommercial
o Attribution
o NoAttribution-ShareAlike
o No Rights Reserved*
38. Your company makes a hardware firewall that runs a custom Linux kernel.
What are your obligations under GPLv2?
o You must ensure your custom kernel runs on a regular Intel machine
o You must make the source to your kernel available*
o There are no requirements
o You must make the source to your custom web interface available
o You must make your hardware designs available
39. Participating in open source projects can improve your technical skills, even if
it is not your day job.
True or False?
o True*
o False

Linux Essentials – Chapter 03 Exam Answers


1. Which of the following is true about graphical mode? (choose three)
o You cannot use your mouse
o You have menus and tools to help you find what you are looking for*
o After login, you are provided with a command prompt
o After login, you are provided with a desktop*
o You access this mode by logging into a graphical display*
2. Which of the following is provided by a graphical interface that isn’t normally
provided to a non graphical interface? (choose four)
o Windows*
o Desktop*
o Menus*
o Popups*
o Shell
3. A server is likely to be running in graphical mode.True or False?
o True
o False*
10

4. In graphical mode, you can get to a shell by running which applications?


(choose two)
o gbash
o guiterm
o terminal*
o xterm*
o xconsole
5. Which of the following are traits of a multiuser operating system? (choose
three)
o Each user can only log in once per day
o Users can protect their information from other users*
o Many users can log in simultaneously with a unique account*
o An administrative user gets a dedicated CPU
o Resources are shared between users*
6. Virtualization means:
o A single host can be split up into multiple guests*
o A user can connect to a server over the network and use a virtual
console
o A machine can swap memory to disk
o Many users can share one hard drive
o Two users get different memory spaces on the same machine
7. In virtualization, what are the host and guest? (choose two)
o The host is the machine that runs the virtual machines*
o A host is a virtual machine
o The terms can be used interchangeably
o A guest is a virtual machine*
o The guest is the machine that runs the virtual machines
8. Which of the following are traits of cloud computing? (choose two)
o You own the hardware but pay for it over time
o You pay for what you use*
o Only Linux works in cloud computing
o You don’t have to worry about performance any more
o The resources are virtualized*
9. If you wanted to write a report that was to be printed, you would probably
use:
o Chrome
o A wiki
o Adobe Flash
o LibreOffice*
o Firefox
10. If you want to store logins and passwords for different websites in a secure
manner, you could use:
o Firefox
o A LibreOffice Document
o KeePassX*
o A sticky note on your monitor
11

o A text file in your home directory


11. You can configure your computer to check for updates automatically.True or
False?
o True*
o False
12. Two components that provide the ability to implement a firewall include:
(choose two)
o ipfw
o iptables*
o Cerberus
o Uncomplicated Firewall
o gufw*
13. What are tradeoffs of increasing the level of privacy you have in your web
browser? (choose two)
o Sites may not work properly*
o Images won’t load properly
o You may get viruses
o Websites may load slower
o You may have to explicitly permit some cookies to be saved*
14. Which of the following is a tool that helps you anonymize your Internet
browsing?
o The onion router*
o iptables
o AnonFirefox
o Web proxy
o CookieCleaner
15. Social network “like” buttons can track your activity across the Internet.True
or False?
o True*
o False
16. Which of the following are properties of a strong password? (choose three)
o A mix of upper and lower case*
o Includes symbols*
o Long so that it can be reused on multiple sites
o At least 10 characters long*
o Based on easy to remember items like birthdays
17. What can be done to prevent remote people from running programs on your
computer? (choose two)
o Use strong passwords on all user accounts*
o Block all cookies
o Turn on a firewall*
o Don’t use wireless networks – only wired
o Block third party cookies
12

Linux Essentials – Chapter 04 Exam Answers 2019


1. Select all the applications that provide access to the Command Line Interface
(CLI)? (choose two)
o opera
o Virtual Terminal*
o Terminal window*
o firefox
2. Which environment variable contains a list of directories that is searched for
commands to execute?
o PATH*
o PS2
o PS1
o EXEC
3. Select the command that can report the location of a command:
o what
o where
o which*
4. A pair of single quotes ( ‘ ) will prevent the shell from interpreting any
metacharacter.True or False?
o True*
o False
5. A pair of double quotes ( ” ) will prevent the shell from interpreting any
metacharacter.True or False?
o True
o False*
6. 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?
o True*
o False
7. Which of the following are glob characters?(choose three)
o The asterisk “*”
o The question mark “?”
o The dash character “-“
o The square brackets “[” and “]”
8. The semicolon “;” can be used to separate multiple commands to be executed
in order.True or False?
o True*
o False
9. 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?
o True
13

o False*
10. To be able to output messages to the screen, use the _______ command:
o display
o type
o print
o echo*
11. The _______ command will print a list of the commands that you’ve
previously executed.
o eval
o history*
o list
o exec
12. To execute the same command as previously executed five commands ago, you
would type:
o &5
o !-5
o @-5
o !5
13. The shell program interprets the commands you type into the terminal, into
instructions that the Linux operating system can execute.True or False?
o True*
o False
14. The acronym CLI stands for:
o Command Line Interpreter
o Computer Link Interpreter
o Computer Line Interface
o Command Line Interface*
15. Traditional UNIX command options used a single dash, like -a; _______
command options use two dashes like –all.
o LINUX
o Kernel
o GNU *
o shell
16. The acronym GNU stands for:
o Gnu’s Not Unix*
o Good News Unix
o Gnu’s Nearly Unix
o Go Next Unit
17. What one character treats the character that follows it as if it was surrounded
by single quotes?
o #
o /
o %
o \
18. The main purpose of using glob characters is to be able to provide a command
a list of filenames.True or False?
14

o True*
o False

Linux Essentials – Chapter 05 Exam Answers


1. What is the standard option to provide a command line program to view its
documentation?
o –help *
o –info
o –doc
o -h
2. The command man -k is the same as the command apropos.True or False?
o True*
o False
3. The whatis command is the same as man -w.
o True
o False*
4. The directory where additional documentation for software packages most
likely can be found is:
o /usr/share/doc *
o /usr/software/doc
o /var/lib/doc
o /var/share/doc
5. Which two pager commands are used by the man command to control
movement within the document? (choose two)
o less*
o grep
o more*
o page
6. Commands typically executed by a user are covered in what section of the
manual?
o 5
o 1*
o 2
o 3
7. To search the man page sections for the keyword example, which of the
following command lines could you execute? (choose two)
o man -f example
o man -k example*
o whatis example
o apropos example*
8. The statement that describes the difference between a man page and an info
page is:
o The info page is like a guide; a man page is a more concise reference.*
o The man page is a long detailed reference; the info page is very terse.
15

o There is very little difference between them.


o The man page is like a guide; the info page is a more concise reference.
9. If you are reading the synopsis of a command from a man page, then items in
square brackets are:
o Optional*
o Comments
o Required options
o Required arguments
10. The following sections commonly appear on a man page: (choose three)
o DESCRIPTION*
o LICENSE
o SYNOPSIS*
o NAME*
11. Section 5 of the manual pages covers:
o User commands
o Games
o File Formats*
o System administration commands
12. To start searching a man page, the first key you press is:
o s
o !
o /
o f
13. In order to exit viewing a man page, pr&ess:
o y
o Z
o x
o q*
14. Which option for the man command should you use if you intend to send the
output of the command to a printer?
o -T
o –text
o -t*
o -m
15. What key should be used while working in the man command if you want to
go to the end of the document?
o g
o e
o G*
o goto
16. To get help on using the info command, execute: (choose two)
o info -q
o info info*
o man info*
o help info
17. To get help while using the info command, press:
16

o g
o z
o a
o h*
18. To exit the info page, press:
o X
o x
o q*
o z
19. In order to search an info page, the first key to press is: (choose one)
o f
o t
o s*
o g
20. To go to the end of an info page, press:
o N
o END*
o ]
o n
21. To go to the next match of a search on a man page, press:
o N
o ]
o }
o n*
22. When interpreting the SYNOPSIS of a command found on a man page, the “|”
means:
o The items it separates cannot be used together*
o The items it separates can be used together
23. After performing a search, you can use the ____ key to return to a previously
found match:
o N*
o U
o n
o D
24. To move a page forward one at a time while viewing a man page, press the
following:
o Spacebar*
o m
o Enter
o A
17

Linux Essentials – Chapter 06 Exam Answers 2019


1. Hidden files are files that begin with what character?
o A dash (-)
o A plus (+)
o A period (.) *
o An asterisk (*)
2. What option for the ls command will display all files, including hidden files?
o -L
o -H
o -w
o -a *
3. The top-level directory on a Linux system is represented as:
o /
o C:
o /home
o /root
4. Is the following path absolute or relative?
/etc/ppp
o Absolute*
o Relative
5. Is the following path absolute or relative?
sysadmin/Documents
o Relative*
o Absolute
6. Is the following path absolute or relative?
../../home/sysadmin
o Relative*
o Absolute
7. The tilde (~) is used to represent:
o A user’s home directory*
o Any two single characters
o The directory above the current working directory
o Nothing; it has no special meaning
8. Which of the following commands can be used to access the home directory of
the user “bob” while logged in as root? (choose two)
o cd /home/bob*
o cd ~bob*
o cd &&
o ~bob
9. The double dot (..) can be used with the cd command to represent:
o The directory above the current working directory*
o Nothing; it has no special meaning.
o Any two single characters
o A user’s home directory.
18

10. The cd command by itself will take you to what directory?


o The system root directory
o None; it is not a valid command
o The directory above the current working directory
o Your home directory*
11. What command will allow you to change your current working directory?
o chdir
o list
o cd *
o ls
12. The double dot (..) can be used to represent the directory…
o …above the current directory.*
o …below the current directory.
o …with any two single numbers.
o …above the current directory only when using the cd command.
13. The ls command without options or arguments…
o …generates an error as this command requires arguments.
o …lists the contents of the current directory.*
o …prompts for a directory to list.
o …lists the contents of a user’s home directory.
14. The first character in a long listing (ls -l) indicates:
o The permissions
o If something is a file, directory, or symbolic link*
o The owner
o The size
15. Which option for the ls command, when used in conjunction with the -l option,
will display human-readable sizes?
o -M
o -S
o -H
o -h *
16. Which of the following commands will prevent any aliased options to the ls
command?
o /ls
o \ls *
o %ls
o ls
17. The ls command color codes results by default.
True or False?
o True
o False *
18. The command ls -S will sort files:
o By size, smallest to largest
o By number of symlinks, largest to smallest
o By modification date, newest to oldest
o By size, largest to smallest*
19

19. When using the cp command, you must provide both a source and a
destination.
True or False?
o True*
o False
20. Which option(s) can be used to prevent cp from overwriting an existing file?
(choose two)
o -n *
o -N
o -z
o -i *
21. The command rm -r will…
o remove a directory along with any files or subdirectories.*
o prompt for each confirmation before deleting each file in a directory.
o remove only empty directories.
o generate an error; -r isn’t a valid option.
22. Which option can be used with the rm command to prompt before deleting?
o -i *
o I
o -P
o A
23. The rm command can delete multiple files at once.
True or False?
o True*
o False
24. Which of the following commands can be used to rename a file?
o name
o mv*
o rn
o cp
25. The touch command can be used to: (choose two)
o Create new files*
o Change a file’s name
o Update the time stamp of existing files*
o Change ownership of a file

Linux Essentials – Chapter 07 Exam Answers 2019


1. Hidden files are files that begin with what character?
o A dash (-)
o A plus (+)
o A period (.) *
o An asterisk (*)
2. What option for the ls command will display all files, including hidden files?
o -L
20

o -H
o -w
o -a *
3. The top-level directory on a Linux system is represented as:
o /
o C:
o /home
o /root
4. Is the following path absolute or relative?
/etc/ppp
o Absolute*
o Relative
5. Is the following path absolute or relative?
sysadmin/Documents
o Relative*
o Absolute
6. Is the following path absolute or relative?
../../home/sysadmin
o Relative*
o Absolute
7. The tilde (~) is used to represent:
o A user’s home directory*
o Any two single characters
o The directory above the current working directory
o Nothing; it has no special meaning
8. Which of the following commands can be used to access the home directory of
the user “bob” while logged in as root? (choose two)
o cd /home/bob*
o cd ~bob*
o cd &&
o ~bob
9. The double dot (..) can be used with the cd command to represent:
o The directory above the current working directory*
o Nothing; it has no special meaning.
o Any two single characters
o A user’s home directory.
10. The cd command by itself will take you to what directory?
o The system root directory
o None; it is not a valid command
o The directory above the current working directory
o Your home directory*
11. What command will allow you to change your current working directory?
o chdir
o list
o cd *
o ls
21

12. The double dot (..) can be used to represent the directory…
o …above the current directory.*
o …below the current directory.
o …with any two single numbers.
o …above the current directory only when using the cd command.
13. The ls command without options or arguments…
o …generates an error as this command requires arguments.
o …lists the contents of the current directory.*
o …prompts for a directory to list.
o …lists the contents of a user’s home directory.
14. The first character in a long listing (ls -l) indicates:
o The permissions
o If something is a file, directory, or symbolic link*
o The owner
o The size
15. Which option for the ls command, when used in conjunction with the -l option,
will display human-readable sizes?
o -M
o -S
o -H
o -h *
16. Which of the following commands will prevent any aliased options to the ls
command?
o /ls
o \ls *
o %ls
o ls
17. The ls command color codes results by default.
True or False?
o True
o False *
18. The command ls -S will sort files:
o By size, smallest to largest
o By number of symlinks, largest to smallest
o By modification date, newest to oldest
o By size, largest to smallest*
19. When using the cp command, you must provide both a source and a
destination.
True or False?
o True*
o False
20. Which option(s) can be used to prevent cp from overwriting an existing file?
(choose two)
o -n *
o -N
o -z
22

o -i *
21. The command rm -r will…
o remove a directory along with any files or subdirectories.*
o prompt for each confirmation before deleting each file in a directory.
o remove only empty directories.
o generate an error; -r isn’t a valid option.
22. Which option can be used with the rm command to prompt before deleting?
o -i *
o I
o -P
o A
23. The rm command can delete multiple files at once.
True or False?
o True*
o False
24. Which of the following commands can be used to rename a file?
o name
o mv*
o rn
o cp
25. The touch command can be used to: (choose two)
o Create new files*
o Change a file’s name
o Update the time stamp of existing files*
o Change ownership of a file

Linux Essentials – Chapter 08 Exam Answers


1. Error messages generated by commands are sent where by default?
o Log files
o STDOUT
o STDERR*
o STDIN
2. A successful command will print output to STDOUT.True or False?
o True*
o False
3. Which of the following commands will direct error messages to the file,
error.log? (choose one)
o ls /root >> error.log
o ls /root 2> error.log*
o ls /root $> error.log
o ls /root > error.log
4. A pipe allows you to…
o …send the same input to multiple commands.
o …type multiple commands at one prompt.
23

o …send the output of one command to another.*


o …send the output of a command to a file.
5. Channel 2 is:
o STDIN
o STDALL
o STDOUT
o STDERR*
6. Which of the following commands will append its output to output.file?
o echo Testing > output.file
o echo Testing >> output.file*
o output.file < echo Testing
o echo Testing -> output.file
7. Which command(s) can be used to sort the lines of list.file alphabetically and
display it on the screen? (choose two)
o sort < list.file*
o cat list.file | sort*
o cat list.file >> sort
o echo list.file > sort
8. Which option of the head command will display only the first five lines of a
file?
o -l 5
o No option needed; head displays only five lines by default.
o -n
o -n 5 *
9. The grep command…
o …will display all the lines that begin with the specified Regular
Expression.
o …is not case sensitive.
o …will display all the lines in a file containing the specified Regular
Expression.*
o …will display the line numbers in a file that contain a specified
Regular Expression.
10. The grep command can be used with glob characters.True or False?
o True*
o False
11. Which of the following commands will display only lines that begin with start?
o grep *start file.txt
o grep $start file.txt
o grep start file.txt
o grep ^start file.txt*
12. Which of the following commands will display only lines that begin with test?
o grep ^test file.txt*
o grep $test* file.txt
o grep *test file.txt
o grep &test file.txt
24

13. Which of the following commands will display lines that contain either start or
end?
o egrep start end file.txt
o egrep ‘start|end’ file.txt*
o egrep start&end file.txt
o egrep (start|end) file.txt
14. Which of the following commands can be used to scroll through a text file?
(choose two)
o some
o less*
o cat
o more*
15. The find command can search for files based on the size of the file.True or
False?
o True*
o False
16. Which of the following commands scans the file to determine file locations?
o search
o locate
o where
o find*
17. Which option for the cut command is used to specify a delimiter?
o -f
o -d *
o =
o -D
18. Which option for the cut command is used to specify the field?
o -D
o -f *
o -d
o #
19. Which option for the wc command will print the number of lines in a file?
o -l *
o -w
o -C
o -L
20. Which option for the wc command will print the total number of words in a
file?
o -l
o -L
o -C
o -w *
21. Which command can be used to print line numbers?
o num
o sort
o ln
25

o nl*
22. The command echo “text” > file.txt will create file.txt if it does not already
exist.True or False?
o True*
o False
23. The command echo “text” > file.txt will not overwrite file.txt if it already
exists.True or False?
o True
o False*
24. The command echo “text” >> file.txt will not overwrite file.txt if it already
exists.True or False?
o True*
o False

Linux Essentials – Chapter 09 Exam Answers 2019


1. The echo command:
o Is used for variable assignment
o Duplicates the input stream to the output stream
o Is used to output text to the console*
o Tests a variable for duplication
o Copies variables from one to another
2. A file begins with #!/bin/csh. This means:
o Nothing, this is a comment
o C Shell compatibility mode is enabled
o The operator should not be using /bin/csh
o Running the script will invoke /bin/csh to interpret the rest of the file*
o This is a Perl script
3. Which are appropriate editors for writing shell scripts? (choose two)
o /bin/bash
o vi*
o LibreOffice Writer
o Firefox
o nano*
4. Most of nano’s commands take the form of:
o Control and another character*
o Alt and another character
o Mouse clicks
o The F1 through F12 function keys
o Escape followed by another character
5. What does this shell script do?
FOO=/tmp/foo
if [ ! –d $FOO ]; then
mkdir $FOO
fi
26

o Creates /tmp/foo if it does not exist*


o Makes the /tmp/foo directory if a file by that name exists
o Outputs a message to the screen
o Creates /tmp/foo and raises an error if there is a problem
o Nothing, since there is a problem with the conditions in the if statement
6. Which of the following are correct about for and while loops? (choose two)
o for loops operate over a fixed list of items*
o while loops operate over a fix list of items
o for loops have a test each cycle to determine if it should run again
o while loops have a test each cycle to determine if it should run again*
o for loops require a variable over which to iterate
7. Given the following part of a script:
if [ -f $1 ]; then
echo “I am here”
fi
What is the meaning of $1?
o It is a special variable that indicates the exit code of the command
before it
o It is the first argument passed to the script*
o It is a file called $1
o It is a parameter to –f, indicating the size of the file
o It is a list of files that gets interpolated
8. Given the following script that is run through ./test.sh hello goodbye:
if [ -f $2 ]; then
echo “I am here”
fi
o When will “I am here” be printed?
o If there are two files in the current directory
o The script will always print “I am here”
o Never
o If a file called “hello” exists in the current directory
o If a file called “goodbye” exists in the current directory*
9. What is the correct way to assign the word “Hello” to a variable?
o $A=”Hello”
o echo “Hello” > A
o A=”Hello” *
o echo $A “Hello”
o A = “Hello”
10. What is the correct way to save the current directory to a variable?
o A=`pwd` *
o A=pwd
o A=cwd
o pwd $A
o pwd | $A
11. Which shell command accepts input from the user’s keyboard?
o echo
27

o $1
o read*
o input
o gets
12. What information is held inside $? ?
o The current process id
o The number of arguments passed to the script
o The current user ID
o The previous command’s exit code*
o The name of the command run
13. How would you finish your script with an exit code of 42?
o return 42
o $?=42
o CODE=42
o exit 42*
o break 42
14. The if command looks for what exit code to consider a condition to be true?
o 10
o 255
o 0*
o 1
o 8
15. The number of users logged in is in a variable called USERS. How would you
test to see if 5 users are logged in?
o test –f USERS=5
o test $USERS = 5
o test $USERS,5
o test $USERS –eq 5 *
o test $USERS –a 5
16. Given the following script:
while [ ! –f /tmp/foo ]; do
echo –n “.”
process_data > /tmp/foo
done
Which of the following are true? (choose two)
o If a file called /tmp/foo exists, process_data won’t be run*
o The screen will fill with dots.
o /tmp/foo will be removed if it exists
o process_data will never be run
o process_data will be called at most once*
17. A conditional that lets you make multiple comparisons with a pattern is
called:
o case*
o fanout
o if
o test
28

o branch
18. What is the meaning of $(( $i + 1)) ?
o 1 will be added to the i variable*
o This will return the value of the next argument to the script
o This runs the command stored in variable i
o If i is 0, the loop will stop
o This will return the value of the first argument to the script
19. How would you write a test that says “if /tmp/foo is a directory or USERS is
greater than 5”?
o test –d /tmp/foo | $USERS > 5
o test –f /tmp/foo –o $USERS –ge 5
o test –d /tmp/foo –o $USERS –gt 5 *
o test /tmp/foo || $USERS > 5
o test /tmp/foo –d –o $USERS -gt 5

Linux Essentials – Chapter 10 Exam Answers 2019


1. Which of the following are valid CPU types for Intel-based platforms? (choose
two)
o 24 bit
o 64 bit*
o 48 bit
o 32 bit*
2. 64 bit platforms can access more memory than 32 bit platforms.
True or False?
o True*
o False
3. Which of the following commands will display CPU information? (choose three)
o arch*
o lscpu*
o cpuinfo
o cat /proc/cpuinfo*
o lspic
4. A CPU flag…
o …defines the CPU manufacturer.
o …defines how many devices can be attached to the system.
o …is not a valid term.
o …defines the features that the CPU supports.*
5. Which command displays information from SMBIOS?
o smbios
o dmidecode*
o showbios
o dmibios
6. Choose all of the following statements that are true in regard to virtual RAM:
(choose three)
29

o Virtual RAM is used when available physical RAM is low.*


o Virtual RAM is also called swap space*
o Virtual RAM is stored on a hard drive*
o Virtual RAM is stored in the CPU
7. Which of the following are common busing systems? (choose two)
o USB*
o CPU
o PCI*
o BIOS
o RAM
8. A division of a hard drive may be referred to as a _______ .
o label
o portion
o partition*
o block
9. Which of the following are valid partitioning types? (choose two)
o PC
o MBR*
o GPT*
o BIOS
10. The fdisk command is a tool used for working with the MBR partitioned disks.
True or False?
o True*
o False
11. Which of the following is the valid device file name for the first IDE hard drive
on the system?
o /dev/ide
o /dev/hda*
o /dev/sda
o /dev/hd1
12. Which of the following are valid video cable connector types? (choose two)
o AMD
o HDA
o DVI*
o VGA*

Linux Essentials – Chapter 11 Exam Answers 2019


1. What does the acronym RPM mean?
o Recursive Package Manager
o RPM Package Management *
o Return Package Management
o Relocate Package Manager
30

2. One way to install new software on a Linux system is to use a package


management system.
True or False?
o True *
o False
3. When you execute the dmesg command, the system displays messages that
are generated by the kernel.
True or False?
o True *
o False
4. Which of the following are package management commands for distributions
with software distributed in files ending in .deb? (choose three)
o aptitude *
o dpkg *
o rpm
o apt-get *
5. Which of the following are package management commands for distributions
with software distributed in files ending in .rpm? (choose three)
o rpm *
o apt-get
o yumex *
o yum *
6. The Linux kernel mounts the following pseudo-filesystems to provide access to
information about hardware devices connected to the system: (choose two)
o /info
o /proc *
o /devices
o /sys *
7. The /proc directory contains a subdirectory for each process present on the
system.
True or False?
o True *
o False
8. The Process ID (PID) of the init process is
o varies
o 100
o 0
o 1*
9. The process (ps) command shows only processes running in the current shell by
default.
True or False?
o True *
o False
10. The following system load averages are displayed by the top command:
(choose three)
o 5 minute *
31

o 1 minute *
o 10 minute
o 15 minute *
11. The free command outputs statistics about:
o Software usage
o Memory usage *
o Disk usage
o CPU usage
12. What directory typically contains log files?
o /proc/log
o /var/log *
o /usr/log
o /log
13. Which log file contains messages regarding authentication and authorization?
o secure *
o messages
o syslog
o dmesg
14. All log files contain only text data.True or False?
o True
o False *
15. A load average of 1.0 always means the system is fully loaded.True or False?
o True
o False *
16. A command that will continuously update statistics about running processes:
o head
o top *
o tail
o bottom
17. The following are valid Linux option styles: (choose three)
o DOS slash (/)
o BSD Unix without a dash *
o Traditional Unix with a single dash (-) *
o GNU long options with two dashes (–) *
18. Which file contains the information passed to the kernel at boot time?
o /proc/cmdline *
o /proc/kernel
o /proc/kargs
o /proc/kopts
19. To make changes permanent for kernel parameter files found under
/proc/sys, the following file can have entries added to it:
o /etc/procsys.conf
o /etc/procctl.conf
o /etc/sysinfo.conf
o /etc/sysctl.conf *
32

20. To get a list of all packages installed on a system using RPM Package
Management you can execute:
o rpm -ql
o rpm -qa *
o rpm -qf
o rpm -qi

Linux Essentials – Chapter 12 Exam Answers 2019


1. Which of the following would be considered a host?
o A CDROM
o The computer’s hard drive
o A network cable
o A printer attached to the network via an IP address*
2. A service is…
o …another name for a computer’s hostname.
o …a feature provided by one computer to another.*
o …a file that contains configuration information.
o …like an IP address.
3. A network packet contains … (choose two)
o …the name of the router.
o …the IP address of the source machine.*
o …a hard drive partition.
o …the IP address of the destination machine.*
4. Only servers have hostnames.
True or False?
o True
o False*
5. Which of the following protocols defines how network communication
functions?
o TCP/IP*
o SSH
o DHCP
o DNS
6. Which of the following are valid IPv4 addresses? (choose two)
o 192.105.10.10*
o 192.105.10.10.2
o 192.301.25.25
o 10.33.55.77*
7. The name of the primary wired network devices is ether0.
True or False?
o True
o False*
8. Which of the following commands will display your machine’s IP address?
o ipconfig
33

o dig
o ifconfig*
o route
9. Which of the following commands will display the routing table? (choose two)
o netstat -r*
o dig
o ifconfig
o route*
10. Which of the following commands will allow you to log into a remote
machine?
o route
o ssh*
o dig
o netstat
11. What option to the netstat command has information shown as numbers
rather than names?
o –name
o -r
o -n *
o -t
12. Which of the following commands will allow you to log into the machine
server1 with the account name nick?
o ssh nick->server1
o ssh nick&server1
o ssh nick-server1
o ssh nick@server1*
13. The RSA key fingerprint allows the dig command to connect to remote systems.
True or False?
o True
o False*

Linux Essentials – Chapter 13 Exam Answers 2019


1. Which files contain user account information? (choose two)
o /etc/passwd*
o /etc/shadow*
o /etc/group
2. Which user can view the /etc/shadow file?
o The root user*
o Any member of the password group
o All users
o No users
3. Which command will display the UID, GID and groups your current user
belongs to?
o id*
34

o who
o whoami
o about
4. Each user belongs to at least one group.
True or False?
o True*
o False
5. Which command will display the users that are currently logged in to the
system?
o whoami
o about
o who*
o id
6. The sudo command allows regular users to…
o …run any command as root, after providing the sudo password.
o …run certain commands as the root user.*
o …run any command as root, after providing the root password.
o …run any commands as a system account without logging in.
7. The /etc/sudoers file should be edited directly by root using the visudo
command.
True or False?
o True*
o False
8. Which of the following commands will allow you to switch to the user, branch?
(choose three)
o sudo branch
o su – branch*
o su -l branch*
o su branch*
9. The visudo command uses which text editor by default?
o vi*
o nano
o pico
o gedit
10. Which of the following commands will display the group(s) a user belongs to?
o group
o id*
o all
o whoami
11. Which of the following commands will display the groups that the user bob
belongs to? (choose one)
o groups -a
o id bob*
o group bob
o all bob
12. The /etc/group file follows what structure?
35

o groups -a
o user:group
o group:GID:user_list
o group_name:password_placeholder:GID:user_list*
13. A GID is associated with a group name.
True or False?
o True*
o False
14. A user can belong to…
o Only five groups
o Only one group
o At least 16 groups*
o Only groups with a GID over 500
15. Sudo privileges can be used to specify which user can use the sudo command
to execute commands as other users.
True or False?
o True*
o False
16. In distributions that do not allow the root user to login directly or via the su
command, the installation process automatically configures one user account
to be able to use the sudo command to execute commands as if they were
executed by the root user.
True or False?
o True*
o False
17. Which of the following commands will display how long the system has been
running since the last boot? (choose two)
o id
o w*
o who
o uptime*
18. The /etc/shadow file contains plain-text passwords.
True or False?
o True
o False*
19. Which command can be used to view the /etc/passwd file entries?
o getent*
o uppasswd
o uptime
o getpasswd

Linux Essentials – Chapter 14 Exam Answers 2019


1. UIDs 1-500 are usually reserved for what kind of users?
o System accounts, such as server processes*
36

o Are not used for user accounts, but for group accounts
o Log-in (human) users
o Remote log-in accounts
2. If a user is deleted, the files and directories that the user owned…
o …will show a UID as the owner, but not user name.*
o …will have no UID owner.
o …are deleted as well.
o …will have no user owner.
3. Which of the following options for the useradd command allows root to specify
the UID to be associated with the account?
o -U
o -u*
o -G
o -g
4. Which of the following options for the useradd command allows root to specify
supplementary groups the user will be a member of?
o -G*
o -u
o U
o -g
5. On a system that does not use UPG, the useradd command will also create a
user group. For example, user bob, group bob.
True or False?
o True
o False*
6. The useradd command will create a home directory by default for a user.
True or False?
o True*
o False
7. The usermod command can be used to do all of the following except…
o …add a user to a supplementary group.
o …change the user’s MAX and MIN password settings.*
o …change the user’s home directory.
o …change the user’s UID and GID.
8. Which of the following commands will add the group extra to the user bob’s
secondary groups in addition to bob’s current secondary groups?
o usermod -G extra bob
o usermod -a extra bob
o usermod -aG extra bob*
o usermod -ag bob extra
9. Which option for the usermod command can be used to specify a user’s group
ID (either primary or secondary)? (choose two)
o -g*
o -G*
o -s
o -S
37

10. For non-root users, the passwd command can only be used to change the
password of the user running the command.True or False?
o True*
o False
11. The userdel command will…
o …delete the user account, but leave the user’s files by default.*
o …will prompt before deleting each file owned by a user.
o …automatically delete a user and the user’s home directory and its
contents.
o …automatically delete a user and all the files owned by that user.
12. The groupmod command can be used to change a group name.
True or False?
o True*
o False
13. The groupmod command can be used to change a group GID.
True or False?
o True*
o False
14. The groupmod command can be used to add users to a group.
True or False?
o True
o False*
15. Which of the following commands can be used to modify a group?
o groupadd
o modgroup
o addgroup
o groupmod*
16. Which command can be used to determine a user’s most recent log in?
o last*
o history
o shell
o login
17. Which of the following files contains encrypted user password information?
o /etc/usr
o /etc/shadow*
o /etc/passwd
o /etc/group
18. Which of the following files contains user IDs?
o /etc/group
o /etc/shadow
o /etc/usr
o /etc/passwd*
19. Which of the following files does the groupadd command use to determine the
new GID when a GID isn’t specified?
o /etc/shadow
o /etc/group*
38

o /etc/passwd
o /etc/usr
20. Which of the following commands, run as root, will prevent the user bob from
logging in?
o usermod -d bob
o usermod -l bob
o usermod -D bob
o usermod -L bob*
21. What directory contains user’s home directories?
o /
o /home*
o /rootfs
o /user

Linux Essentials – Chapter 15 Exam Answers 2019


1. Which of the following commands set “other” permissions on file to r-x?
o chmod o=r+x file
o chmod o=rx file*
o chmod o-r-w file
o chmod o+rx file
2. Which of the following commands sets “other” permissions on file to r-x?
o chmod 777 file
o chmod 776 file
o chmod 775 file*
o chmod 774 file
3. Only one set (user, group, other) of permission can be changed at once using
the symbolic method.
True or False?
o True
o False*
4. Which of the following are methods for setting permissions using the chmod
command? (choose two)
o binary
o symbolic*
o letter
o octal*
5. The chown command can be used to change the owner and group of a file.
True or False?
o True*
o False
6. The chgrp command can be used to change the owner and group of a file.
True or False?
o True
o False*
39

7. The user sysadmin will be able to read the file because they own it.
—-r–r– 1 sysadmin group 38270 Sep 2 18:49 file
True or False?
o True
o False*
8. The user sysadmin will be able to change the permissions of the file because
they own it.
—-r–r– 1 sysadmin group 38270 Sep 2 18:49 file
True or False?
o True*
o False
9. Octal notation uses the following values for the permissions granted:
o r = 4, w = 2, x = 1*
o r = 7, w = 5, x = 0
o r = 3, w = 2, x = 1
o r = 4, w = 2, x = 0
10. Which of the following permissions would allow all users to add, view, and
delete files in a directory?
o 666
o 775
o 750
o 777*
11. A user cannot delete a file if they do not own it.
True or False?
o True
o False*
12. The “execute” permission on a directory allows you to: (choose three)
o Change to that directory or use it as part of a path*
o Along with write permission to successfully delete the directory
o Along with read permission to successfully perform ls -l*
o Along with write permission to successfully create new files*
13. The “execute” permission on a file allows you to:
o Run the file as a script*
o This permission isn’t meaningful for text files.
o Delete the file
o Move the file to a new directory
14. The chgrp command can be used on a file by:
o Only root
o A user that belongs to the files current group
o The file owner and root*
o Only the file owner
15. The chown command can be used to change the user owner on a file by:
o Only root*
o A user that belongs to the files current group
o The file owner and root
o The file owner
40

16. The chmod command can be used on a file by:


o The file owner and root*
o Only root
o A user that belongs to the files current group
o The file owner
17. Which option for the chown command can be used to change the owner of a
directory and all the files and directories below it?
o -r
o -R*
o -f
o -a
18. The chown command will only accept one file at a time as an argument.
True or False?
o True
o False*
19. The “execute” permission is never set on files by default.
True or False?
o True*
o False
20. The user owner of a file will always have the same or higher permissions as
“other”.
True or False?
o True
o False*

Linux Essentials – Chapter 16 Exam Answers 2019


1. The /tmp directory is a temporary directory and will not exist on a system at
all times.
True or False?
o True
o False*
2. The /var directory has files that change over time.
True or False?
o True*
o False
3. The “sticky bit” permission…
o …prevents others from overwriting files they don’t own in common
directories.
o …changes the group ownership of existing files in a directory.
o …prevents others from removing files they don’t own from a common
directory.*
o …sets the group ownership of any new file created in a directory.
4. Which of the following commands will set the “sticky bit” on /shared ?
o chmod 4777 /shared
41

o chmod 1777 /shared*


o chmod 2777 /shared
o chmod 7777 /shared
5. The “setuid” permission…
o …allows files in a directory to be manipulated as by the directory
owner.
o …reports the output of a script to the owner.
o …allows a command to be run as the file owner.*
o …prevents the owner of a file from being changed.
6. Which of the following commands will set setuid for /usr/bin/program?
o None of the above
o chmod 2755 /usr/bin/program
o chmod 1755 /usr/bin/program
o chmod 4755 /usr/bin/program*
7. The setgid permission… (choose two)
o …allows files created in a directory to be owned by the group that
owns the directory.*
o …can only be set on files.
o …allows a command to be run as the group owner of the file.*
o …prevents the group owner of a file from being changed.
8. Which of the following commands will set setgid on /shared ?
o None of the above
o chmod 4777 /shared
o chmod 1777 /shared
o chmod 2777 /shared*
9. Setting setgid on a directory…
o …will allow scripts in the directory to be executed as the group owner
of the directory.
o …will set the group owner of all files created in the directory to the
group owner of the directory.*
o …does nothing.
o …is not allowed by the system.
10. Deleting a source file will break an associated hard link.True or False?
o True
o False*
11. A source and a hard link must be part of the same filesystem.True or False?
o True*
o False
12. Deleting a source file will break an associated symbolic link.True or False?
o True*
o False
13. A source file and a symbolic link must be part of the same file system.True or
False?
o True
o False*
14. Which of the following commands would create a hard link, link to file?
42

o ln file link*
o ln -s link file
o ln -s file link
o ln link file
15. Which of the following commands would create a symbolic link, link to file?
o ln -s link file
o ln file link
o ln -s file link*
o ln link file

You might also like