You are on page 1of 91

NDG Linux Unhatched Assessment Answers 100%

Posted on November 12, 2018

Last Updated on November 12, 2018 by Admin

NDG Linux Unhatched Assessment Answers 100%


1. What does CLI stand for?
o Core Learning Interface
o Command Learning Interface
o Core Line Interface
o Command Line Interface
2. Commands are case-sensitive.

True or False?

o True
o False
3. When entering a command, do arguments or options typically come first?
o Options
o Arguments
4. Which of the following is NOT a correct way to combine options?
o -l -r
o -lr
o -r l
o -rl
5. Which command will print your current location in the filesystem?
o pcl
o pwd
o pd
o cd
6. Which command will allow you to change your current directory?
o ls
o cd
o ch
o chdir
7. Which of the following is NOT an example of an absolute path?
o /
o /home/sysadmin
o Documents
8. Which of the following is NOT an example of a relative path?
o Documents
o /home
o Documents/Work
o home/sysadmin/Documents/School/Art
9. The ~ (tilde) character is used to represent:
o A user’s home directory
o Nothing, it doesn’t have a special meaning
o The current directory
o The directory above the current directory
10.The .. (double period) characters are used to represent:
o A user’s home directory
o The current directory
o Nothing, it doesn’t have a special
o The directory above the current directory
11.The . (period) character is used to represent:
o The directory above the current directory
o A user’s home directory
o The current directory
o Nothing, it doesn’t have a special meaning
12.The ls command without options or 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.
o …generates an error as this command.
13.The first character in a long listing ls -l indicates:
o Hard Link Count
o File Size
o Permissions
o File Type
14.Which option to the ls will sort the output by file size?
o -z
o -r
o -S
o -s
15.Which of these commands will create a new shell logged in as the root user?
o sudo
o su
16.Which of the following sets has the owner permissions highlighted?
o rw-rw-r–
o rw-rw-r–
o rw-rw-r–
o rw-rw-r–
17.Which of the following sets has the group permissions highlighted?
o rw-rw-r–
o rw-rw-r–
o rw-rw-r–
o rw-rw-r–
18.Which of the following sets has the other permissions highlighted?
o rw-rw-r–
o rw-rw-r–
o rw-rw-r–
o rw-rw-r–
19.Which command will allow a user to change the permissions of a file?
o perm
o chown
o chmod
o chperm
20.Which of the following permission sets indicates the other owner has only the read
permission?
o rw-r–rwx
o rwxrw-r-x
o r–r–r-x
o rw-rw-r–
21.Which of the following commands is used to change the ownership of a file?
o chow
o chmod
o chown
o chperm
22.Changing the user owner of a file requires administrative access.

True or False?

o True
o False
23.Which of the following commands can be used to rename a file?
o name
o cp
o rn
o mv
24.The mv command requires at least two arguments.

True or False?

o True
o False
25.Which command can be used to copy a file?
o mv
o rm
o cy
o cp
26.The cp command requires at least two arguments.

True or False?

o True
o False
27.Which command is used to copy files at the bit level?
o cp
o dd
28.The rm command requires at least two arguments.

True or False?

o True
o False
29.Which option to the rm command will allow a user to delete directories?
o -l
o -r
o -d
o -a
30.Which of the following commands is used to filter text?
o text
o grep
o dd
o regex
31.Which of the following commands will return 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
32.Which of the following commands will return only lines that end with test?
o grep ‘$test’ file.txt
o grep ‘test$’ file.txt
o grep ‘test^’ file.txt
o grep ‘^test’ file.txt
33.Which of the following lines would be NOT returned by the grep ‘[^0-9]’ file.txt
command?
o I am 37 years old.
o My favorite food is avocados.
o 3121991
o Hello my name is Joe.
34.Which of the following lines would be returned by the grep ‘b[oe]t’ file.txt
command?
o beet
o bet
o boet
o boot
35.Which of the following commands will NOT shutdown the system immediately?
o shutdown
o shutdown now
o shutdown now ‘Goodbye World!’
o shutdown +0
36.Which of the following commands can be used to display network configuration
information?
o netconfig
o pwd
o ifconfig
o net
37.Which of the following commands will display every process?
o ps –all
o ps -e
o ps
o ps -a
38.The ps command requires administrative access.

True or False?

o True
o False
39.Which of the following commands will update all packages?
o apt-get upgrade
o apt-get update
o apt-get install
o apt-get search
40.Which of the following will delete all of a package’s files?
o apt-get remove
o apt-get delete
o apt-get purge
o apt-get trash
41.Which of the following commands should be executed before installing a package?
o apt-get upgrade
o apt-get update
o apt-get install
o apt-get search
42.Users can update their own passwords.

True or False?

o True
o False
43.The root user can change the password of any user.

True or False?

o True
o False
44.Which option can be used to view status information about the current user’s
password?
o -i
o -I
o -S
o -s

NDG Linux Essentials Chapter 1 Answers


Posted on January 4, 2019

Last Updated on January 4, 2019 by Admin

NDG Linux Essentials Chapter 1 Answers


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 Turn source code into machine code
o Load the operating system after the computer is turned on
2. Unix is:

(choose two)

o A text editor
o An operating system
o A distribution of Linux
o A type of hardware
o A trademark
3. Linux is written in:
o C++
o Java
o .NET
o Perl
o C
4. Source code refers to:
o A human readable version of computer software
o The version of a program that the computer runs on the CPU
o The interface that software uses to talk to the kernel
o The license that dictates how you may use and share the software
5. Open source means:

(choose two)

o You must support the software you share


o You cannot charge anything for the software
o You must share your changes
o You can modify the software’s source code
o You can view the software’s source code
6. Most of the tools that are part of Linux systems come from:
o Red Hat and Debian
o The Open Source Initiative
o The GNU project
o The Linux foundation
o Google
7. The Linux platform that runs on mobile phones is called:
o LinuxMobile
o IOS
o MicroLinux
o Android
o Teldroid
8. What does a distribution provide to add and remove software from the system?
o Bash
o Partitioning tool
o Package manager
o Compiler
o Application Programming Interface (API)
9. Assign initial settings such as network address
o Perform the initial installation of the kernel to hard drive
o Load the application into memory
o Install software from the Internet or removable media
o Load the kernel after the computer is powered on
10.UNIX was originally invented at:
o AT&T Bell Labs
o Xerox PARC
o Berkeley University
o Stanford University
o Bangalore University
11.A license where you don’t have access to the source code is called:
o Sourceless
o Open source
o Closed source
o Impaired source
12.Which distributions are made by, or clones of, Red Hat?

(choose two)

o Ubuntu
o CentOS
o Fedora
o Debian
o Slackware
13.Ubuntu is derived from which distribution?
o Slackware
o Scientific Linux
o Red Hat Enterprise Linux
o Debian
o Fedora
14.Open source licenses differ, but generally agree that:

(choose two)

o You should be able modify the software as you wish


o You should have access to the source code of software
o You must redistribute your changes
o You are not allowed to sell the 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 Whether or not it is cloud-friendly
o What the computer will do
o The licensing model of the operating system
o How much performance is needed
o The operating system’s mascot
17.Linux is not Unix because:
o It hasn’t undergone certification
o It’s not made by the Open Group
o It’s not good enough
o It’s free
o There are too many distributions
18.A release cycle:
o Is always 6 months
o Doesn’t matter in an Open Source environment
o Only applies to software you pay for
o Describes how often updates to the software come out
o Describes how long the software will be supported for
19.A maintenance cycle:
o Should be short so you always have the freshest releases
o Should be long so that you have time before you need to upgrade
o Only has meaning for paid software
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 works across Linux/Mac/Windows
o It can be upgraded without downtime
o It still supports old file formats or applications
o People still use old versions
o If the next version still works the same way
22.Apple’s OS X is:

(choose three)

o Primarily used to manage network services


o Certified as UNIX compatible
o Derived from Linux
o Able to natively run Windows binaries
o Only compatible with Apple hardware
o Derived from FreeBSD
23.Microsoft Windows:

(choose three)

o Comes in desktop and server variants


o Has a short maintenance cycle
o Has powerful scripting capabilities
o Has a new desktop version every year.
o Has built in virtualization
o Has a Linux compatibility mode
24.Other commercial Unixes:

(choose two)

o Are tied to their vendor’s hardware


o Are almost obsolete
o Are UNIX certified
o Do not run the GNU tools
o Use completely different commands than Linux
25.When choosing a distribution of Linux, you should consider:

(choose five)

o Whether or not the distribution is under active development


o Which management tools are provided by the distribution
o If you need support on the distribution itself
o Popularity on social media.
o The maintenance cycle of the distribution
o Which distributions are supported by the software you need to run

NDG Linux Essentials Chapter 2 Answers


Posted on January 4, 2019

Last Updated on January 4, 2019 by Admin

NDG Linux Essentials Chapter 2 Answers


1. The Samba application is a:
o File Server
o Mail Server
o Security Server
o Web Server
2. Which of the following are examples of desktop software?

(choose two)

o Compiler
o File share
o Web browser
o Web server
o Music player
3. If you wanted to set up a blog, which software would be most helpful?
o Samba
o MySQL
o Postfix
o Dovecot
o WordPress
4. Which of the following pieces of software deal with file sharing?

(choose three)

o Samba
o Netatalk
o PostgreSQL
o NFS
o X-Windows
5. If you wanted to create and print an invoice, which software could you use?
o Firefox
o LibreOffice
o GNOME
o Compiz
o Evolution
6. POP and IMAP are related to:
o Letting users log in to multiple servers with 1 set of credentials
o Email
o Reading and writing music
o Sharing files
o Serving web pages
7. When a computer boots, it can get its network information through:
o SMTP
o LDAP
o DHCP
o X11
o DNS
8. Which of the following are examples of text editors?

(choose four)

o pico
o nano
o yum
o vim
o emacs
9. A package manager:

(choose two)

o Can optionally repartition your disk to make room for Linux


o Emails you when software is out of date
o Performs a fresh install of Linux
o Downloads software from the Internet
o Keeps track of which files belong to which packages
10.An interpreted programming language:

(choose two)

o Requires a compilation step but no linking step


o Takes fewer resources to run than a compiled language
o Requires a linking step but no compilation step
o Tends to offer more features than compiled languages
o Is converted into machine specific instructions as the program runs
11.Which of the following are true about compiled programming languages?
o Ruby is a compiled language
o Compiled languages are great for system administration tasks like scripting
o Perl is a compiled language
o C 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 apt-get
o vim
o tar
o bash
o yum
13.The Linux shell:

(choose three)

o Is responsible for tracking the location of configuration files


o Is customizable
o Has a built in text editor
o Has a scripting language
o Allows you to launch programs
14.Which application would you use to edit and piece together sound files to make
podcast?
o Bash
o GIMP
o Thunderbird
o Audiolicious
o Audacity
15.The two main families of Linux shells are:

(choose two)

o Bourne Shell
o C Shell
o emacs
o Korn shell
o Python Shell
16.Which server software would you use to create a company directory that you could
search and authenticate against?
o Netatalk
o OpenLDAP
o bind
o ISC DHCP
o Samba
17.A Mail Transfer Agent’s primary purpose is to:
o Manage the end user’s inbox
o Deliver mail between servers
o Act as a gateway between faxes and email
o Filter out spam
o Serve email to end clients
18.Which of the following are examples of a web server?

(choose two)

o postfix
o Apache
o WordPress
o NFS
o Nginx
19.If you wanted to let a Linux machine share files with Windows clients and servers,
you would use:
o NFS
o Samba
o Netatalk
o DNS
o bind
20.Richard Stallman is associated with:
o The Free Software Foundation
o BSD Unix
o The Apache foundation
o Microsoft
o The Open Source Initiative
21.A “copyleft provision” in a software license means:
o You may not link against third party closed source software
o You give up your copyright to the software
o You must provide support for your modifications
o You must provide free copies of the software if you use it
o If you redistribute the software, you must distribute the source to any changes you make
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 BSD has no copyleft provision
o Nothing, they are virtually identical
o GPLv2 requires assigning copyright to the FSF
23.The Free Software Foundation believes that:

(choose two)

o People should write software with no expectation of making money


o Software should be free to share
o No money should ever change hands
o Software should be free to modify
o Software should not have copyright
24.Which of the following licenses was made by the FSF?
o MIT
o Apache
o Creative Commons
o BSD
o GPLv3
25.A permissive free software license:

(choose two)

o Places no restrictions on sharing modifications


o Means you can use the software for anything you want
o Does not allow the software to be locked to certain hardware
o Requires you share software changes but not binaries
o Places the software in the public domain
26.Linux is distributed under which license?
o Linux Foundation
o GPLv3
o GPLv2
o MIT
o BSD
27.Who founded the Open Source Initiative?

(choose two)

o Linus Torvalds
o Richard Stallman
o Eric Raymond
o University of California at Berkeley
o Bruce Perens
28.A generic term for Open Source and Free Software is:
o FLOSS
o Libre Software
o GPL
o OS/FS
o SLOFF
29.Which are examples of permissive software licenses?

(choose two)

o GPLv3
o MIT
o BSD
o GPLv2
o LGPLv3
30.What does it mean when a work is placed in the public domain?
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
o The author has died
o The work was done by a government agency
31.Creative Commons licenses allow you to:

(choose three)

o Specify whether or not changes must be shared


o Specify whether or not people may distribute changes
o Get a veto on where the work is used
o Allow or disallow commercial use
o Receive royalties on the use of the work
32.If a podcast is licensed under the CC BY-ND license, you may:

(choose two)

o Add ads to it and post it to your website.


o Sell it as part of a compilation
o Share it as long as you give credit to the author
o Use an interview or song from it for your own podcast
o Post it to your website
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 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
o Take payments for fixing bugs
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 was made by the OSI while GPL was made by the FSF
o LGPL allows linking to non GPLed software
o LGPL applies to web services
o LGPL allows you to distribute the software in binary-only form
o LGPL is shorter than GPL
36.Permissive free software licenses:

(choose three)

o Are not approved by the FSF


o Don’t have a copyleft provision
o Can allow software to be used inside closed source software
o Include the GPLv2 and BSD
o Are not approved by the OSI
37.The Creative Commons version of Public Domain licensing is:
o Attribution-NonCommercial
o Attribution-NonCommercial-ShareAlike
o No Rights Reserved
o Attribution
o NoAttribution-ShareAlike
38.Your company makes a hardware firewall that runs a custom Linux kernel. What
are your obligations under GPLv2?
o You must make the source to your custom web interface available
o You must make your hardware designs available
o You must make the source to your kernel available
o You must ensure your custom kernel runs on a regular Intel machine
o There are no requirements
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

NDG Linux Essentials Chapter 3 Answers


Posted on January 4, 2019

Last Updated on January 4, 2019 by Admin

NDG Linux Essentials Chapter 3 Answers


1. Which of the following is true about graphical mode?

(choose three)

o You have menus and tools to help you find what you are looking for
o You cannot use your mouse
o After login, you are provided with a command prompt
o You access this mode by logging into a graphical display
o After login, you are provided with a desktop
2. Which of the following is provided by a graphical interface that isn’t normally
provided to a non graphical interface?

(choose four)

o Popups
o Desktop
o Windows
o Menus
o Shell
3. A server is likely to be running in graphical mode.

True or False?

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

(choose two)

o terminal
o guiterm
o xconsole
o xterm
o gbash
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 A guest is a virtual machine


o The terms can be used interchangeably
o The host is the machine that runs the virtual machines
o The guest is the machine that runs the virtual machines
o A host is a virtual machine
8. Which of the following are traits of cloud computing?

(choose two)

o The resources are virtualized


o You don’t have to worry about performance any more
o You pay for what you use
o Only Linux works in cloud computing
o You own the hardware but pay for it over time
9. If you wanted to write a report that was to be printed, you would probably use:
o Adobe Flash
o LibreOffice
o Chrome
o Firefox
o A wiki
10.If you want to store logins and passwords for different websites in a secure manner,
you could use:
o A sticky note on your monitor
o A text file in your home directory
o KeePassX
o A LibreOffice Document
o Firefox
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 iptables
o Uncomplicated Firewall
o ipfw
o gufw
o Cerberus
13.What are tradeoffs of increasing the level of privacy you have in your web browser?

(choose two)

o You may have to explicitly permit some cookies to be saved


o Websites may load slower
o You may get viruses
o Sites may not work properly
o Images won’t load properly
14.Which of the following is a tool that helps you anonymize your Internet browsing?
o The onion router
o CookieCleaner
o iptables
o Web proxy
o AnonFirefox
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 Long so that it can be reused on multiple sites


o Based on easy to remember items like birthdays
o At least 10 characters long
o Includes symbols
o A mix of upper and lower case
17.What can be done to prevent remote people from running programs on your
computer?

(choose two)

o Don’t use wireless networks – only wired


o Use strong passwords on all user accounts
o Turn on a firewall
o Block all cookies
o Block third party cookies

NDG Linux Essentials Chapter 4 Answers


Posted on January 4, 2019

Last Updated on January 4, 2019 by Admin


NDG Linux Essentials Chapter 4 Answers
1. Select all the applications that provide access to the Command Line Interface
(CLI)?

(choose two)

o Virtual Terminal
o firefox
o opera
o Terminal window
2. Which environment variable contains a list of directories that is searched for
commands to execute?
o EXEC
o PATH
o PS2
o PS1
3. Select the command that can report the location of a command:
o where
o which
o what
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 dash character “-“


o The asterisk “*”
o The question mark “?”
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
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 list
o history
o exec
o eval
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 Computer Line Interface
o Computer Link Interpreter
o Command Line Interpreter
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 shell
o GNU
o Kernel
16.The acronym GNU stands for:
o Gnu’s Not Unix
o Gnu’s Nearly Unix
o Good News 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?

o True
o False

NDG Linux Essentials 2.0 Midterm Exam


(Chapter 1-9) Answers
Posted on May 9, 2019

Last Updated on May 22, 2019 by Admin

NDG Linux Essentials 2.0 Midterm Exam (Chapter 1-9) Answers


1. The most popular Linux platform for mobile phones is:
o Android
o Slackware
o BlackBerry
o IOS
o MobileLinux
2. The release cycle:
o Only has meaning for paid software
o Describes how long software will be supported
o Should be long so that you have time before you need to upgrade
o Should be short so you always have the freshest releases
o Dictates how often software is updated
3. What does a distribution provide to add and remove software from the system?
o Package Manager
o Application Programming Interface (API)
o Partitioning tool
o Compiler
o Bash
4. A maintenance cycle:
o Describes how often updates for software come out
o Should be short so you always have the freshest releases
o Describes how long a version of software will be supported
o Only has meaning for paid software
o Should be long so that you have time before you need to upgrade
5. When choosing a distribution of Linux, you should consider:

(choose five)

o Popularity on social media


o Does the distribution offer a “stable” version
o Does your organization require long-term support for the system
o If the application software is supported by the distribution
o Will users require a GUI
o Will commercial support be required for the OS
6. Which of the following are examples of desktop software?

(choose two)

o File share
o Compiler
o Music player
o Web server
o Web browser
7. Which of the following pieces of software deal with file sharing?

(choose three)

o Netatalk
o Samba
o X-Windows
o NFS
o PostgreSQL
8. The Linux shell:

(choose three)

o Is responsible for tracking the location of configuration files


o Has a scripting language
o Has a built-in text editor
o Is customizable
o Allows you to launch programs
9. Virtualization means:
o Many users can share one hard drive
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 A single host can be split up into multiple guests
o Two users get different memory spaces on the same machine
10.In graphical mode, you can get to a shell by running which applications?

(choose two)

o Gbash
o Guiterm
o Terminal
o Xterm
o console
11.Source code refers to:
o A human-readable version of computer software
o The interface that software uses to talk to the kernel
o The version of a program that the computer runs on the CPU
o The license that dictates how you may use and share the software
12.Open source means:

(choose two)

o You can modify the software’s source code


o You must share your changes
o You must support the software you share
o You cannot charge anything for the software
o You can view the software’s source code
13.A copyleft provision in a software license means:
o You give up your copyright to the software
o You may not link against third party closed source software
o You must provide support for your modifications
o You must provide free copies of the software if you use it
o If you redistribute the software, you must distribute the source to any changes you make
14.Linux is distributed under which license?
o MIT
o GPLv2
o GPLv3
o Linux Foundation
o BSD
15.Creative Commons licenses allow you to:

(choose three)

o Receive royalties on the use of the work


o Allow or disallow commercial use
o Specify whether or not people may distribute changes
o Get a veto on where the work is used
o Specify whether or not changes must be shared
16.Which environment variable contains a list of directories that is searched for
commands to execute?
o PS2
o PATH
o EXEC
o PS1
17.Select the command that can report the location of a command:
o what
o where
o which
18.A pair of double quotes (" ) will prevent the shell from interpreting any
metacharacter.
True or False?

o True
o False
19.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
20.The acronym CLI stands for:
o Command Line Interface
o Computer Link Interpreter
o Command Line Interpreter
o Computer Line Interface
21.The most common shell used for Linux distributions is the ________ shell.
o Zsh
o Fish
o Tsch
o Bash
22.Which two pager commands are used by the man command to control movement
within the document?

(choose two)

o more
o page
o grep
o less
23.To search the man page sections for the keyword example, which of the following
command lines could you execute?

(choose two)

o man -k example
o apropos example
o man -f example
o whatis example
24.The statement that describes the difference between a man page and an info page is:
o The man page is a long detailed reference; the info page is very terse.
o There is very little difference between them.
o The man page is like a guide; the info page is a more concise reference.
o The info page is like a guide; a man page is a more concise reference.
25.The following sections commonly appear on a man page:

(choose three)

o SYNOPSIS
o NAME
o LICENSE
o DESCRIPTION
26.The top-level directory on a Linux system is represented as:
o /
o /home
o C:
o /root
27.The tilde (~) is used to represent:
o Nothing; it has no special meaning
o Any two single characters
o The directory above the current working directory
o A user’s home directory
28.The cd command by itself will take you to what directory?
o The directory above the current working directory
o None; it is not a valid command
o Your home directory
o The system root directory
29.What command will allow you to change your current working directory?
o ls
o list
o chdir
o cd
30.The first character in a long listing (ls -l) indicates:
o If something is a file, directory, or symbolic link
o The size
o The permissions
o The owner
31.Which of the following commands can be used to rename a file?
o rm
o cp
o name
o mv
32.The touch command can be used to:

(choose two)

o Change ownership of a file


o Create new files
o Change a file’s name
o Update the timestamp of existing files
33.Which of the following are glob characters?

(choose three)

o The question mark “?”


o The dash character “-“
o The square brackets “[” and “]”
o The asterisk “*”
34.The main purpose of using glob characters is to be able to provide a list of filenames
to a command.

True or False?
o True
o False
35.The asterisk character is used to represent zero or more of any character in a
filename.

True or False?

o True
o False
36.Compression of a file works by:
o Removing the high order bit from each byte
o Eliminating gaps within the file
o Storing most of the data on removable media and just leaving a pointer
o Removing redundant information
o Consolidating multiple files into one
37.Lossy compression:

(choose three)

o Usually results better compression than lossless


o Is often used with images
o Sacrifices some quality
o Is often used with documents
o Decompresses to an identical version as the original
38.Which of the following commands can be used to compress a file?

(choose three)

o zip
o bzip2
o gzip
o bunzip2
o cat
39.The three main modes of tar are:

(choose three)

o Copy
o List
o Compress
o Extract
o Create
40.In the command tar -czf foo.tar.gz bar, what is the purpose of the f flag?
o Tells tar to write to the file that follows the flag
o Tells tar to print the name of each file as it is processed
o Tells tar to read from the file that follows the flag
o Specifies extra compression is to be used
o Tells tar to copy only files, and not directories
o
NDG Linux Essentials 2.0 Final Exam (Chapter 9-
18) Answers
Posted on May 9, 2019

Last Updated on May 23, 2019 by Admin

NDG Linux Essentials 2.0 Final Exam (Chapter 9-18) Answers


1. Which of the following are traits of a multiuser operating system?

(choose three)

o Resources are shared between users


o Users can protect their information from other users
o Many users can log in simultaneously with a unique account
o Each user can only log in once per day
o An administrative user gets a dedicated CPU

2. A pipe allows you to…


o …send the same input to multiple commands.
o …type multiple commands at one prompt.
o …send the output of one command to another.
o …send the output of a command to a file.

3. Channel 2 is:
o STDALL
o STDOUT
o STDERR
o STDIN

4. The grep command…


o …will display all the lines that begin with the specified Regular Expression.
o …will display all the lines in a file containing the specified Regular Expression.
o …is not case sensitive.
o …will display the line numbers in a file that contain a specified Regular Expression.

5. Which of the following commands can be used to scroll through a text file?

(choose two)

o cat
o less
o some
o more

6. Which command can be used to print line numbers?


o ln
o nl
o sort
o num
7. Which are appropriate editors for writing shell scripts?

(choose two)

o LibreOffice Writer
o vi
o Firefox
o nano
o /bin/bash

8. Which of the following are correct about for and while loops?

(choose two)

o while loops operate over a fixed 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 operate over a fixed list of items
o for loops require a variable over which to iterate

9. What is the correct way to assign the word “Hello” to a variable?


o $A=”Hello”
o A = “Hello”
o echo “Hello” > A
o A=”Hello”
o echo $A “Hello”

10.What is the correct way to save the current directory to a variable?


o pwd $A
o A=cwd
o A=`pwd`
o A=pwd
o pwd | $A

11.What is the meaning of $(( $i + 1)) ?


o If i is 0, the loop will stop
o This runs the command stored in variable i
o This will return the value of the next argument to the script
o 1 will be added to the i variable
o This will return the value of the first argument to the script

12.Which of the following are valid CPU types for Intel-based platforms?

(choose two)

o 64-bit
o 24-bit
o 32-bit
o 48-bit

13.Choose all of the following statements that are true in regard to virtual RAM:

(choose three)
o Virtual RAM is stored in the CPU
o Virtual RAM is also called swap space
o Virtual RAM is stored on a hard drive
o Virtual RAM is used when available physical RAM is low.

14.A division of a hard drive may be referred to as a _______ .


o label
o block
o portion
o partition

15.The fdisk command is a tool used for working with the MBR partitioned disks.

True or False?

o True
o False

16.Which of the following commands will display CPU information?

(choose two)

o cpuinfo
o lscpu
o showcpu
o lspic
o arch

17.The Process ID (PID) of the init process is:


o 100
o 0
o 1
o varies

18.What directory typically contains log files?


o /proc/loc
o /usr/log
o /log
o /var/log

19.The /var directory has files that change over time.

True or False?

o True
o False

20.Which of the following commands will allow you to view all processes on the system?

(choose two)

o ps -ef
o ps aux
o ps -eLf
o ps -A
o ps

21.Which directory is the root of the filesystem?


o /sys
o /
o /var
o /home
o /root

22.A service is…


o …another name for a computer’s hostname.
o …a file that contains configuration information.
o …like an IP address.
o …a feature provided by one computer to another.

23.Only servers have hostnames.

True or False?

o True
o False

24.Which of the following are valid IPv4 addresses?

(choose two)

o 10.33.55.77
o 192.105.10.10.2
o 192.105.10.10
o 192.301.25.25

25.Which of the following commands will allow you to log into a remote machine?
o route
o ssh
o dig
o netstat

26.Which files contain user account information?

(choose two)

o /etc/passwd
o /etc/passwords
o /etc/shadow
o /etc/group

27.Which command will display the UID, GID and groups your current user belongs
to?
o whoami
o Who
o about
o id
28.Each user belongs to at least one group.

True or False?

o True
o False

29.Which command will display the users that are currently logged in to the system?
o id
o who
o about
o whoami

30.Which command will display the groups that the root user belongs to?
o all
o all -t
o group -r
o id root
o groups -a

31.UIDs 1-499 are usually reserved for what kind of users?


o Are not used for user accounts, but for group accounts
o Log-in (human) users
o Remote log-in accounts
o System accounts, such as server processes

32.Which of the following options for the useradd command allows root to specify the
UID to be associated with the account?
o -u
o -g
o -M
o -G

33.Which command can be used to determine a user’s most recent log in?
o last
o login
o history
o shell

34.Which of the following files contains encrypted user password information?


o /etc/shadow
o /etc/group
o /etc/usr
o /etc/passwd

35.Which of the following options for the useradd command allows you to use a
different primary group then the default?
o -G
o -u
o -U
o -g

36.Which of the following commands can be used to modify a user?


o adduser
o usermod
o moduser
o useradd

37.Which of the following are methods for setting permissions using the chmod
command?

(choose two)

o letter
o primary
o symbolic
o octal

38.The chown command can be used to change the owner and group of a file.

True or False?

o True
o False

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


o The file owner and root
o The file owner
o Only root
o A user that belongs to the files current group

40.The “execute” permission is never set on files by default.

True or False?

o True
o False

41.The “sticky bit” permission…


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.
o …prevents others from overwriting files they don’t own in common directories.

42.The “setuid” permission…


o …prevents the owner of a file from being changed.
o …reports the output of a script to the owner.
o …allows a command to be run as the file owner.
o …allows files in a directory to be manipulated as by the directory owner.

43.The “setgid” permission…

(choose two)

o …prevents the group owner of a file from being changed.


o …allows files created in a directory to be owned by the group that owns the directory.
o …allows a command to be run as the group owner of the file.
o …can only be set on files.
44.Which of the following ls commands, when executed, will only show information
about the directory itself?

(choose two)

o ls -h
o ld -d
o ld -a
o ls -ld

NDG Linux Essentials 2.0 Final Comprehensive


Exam (Chapter 1-18) Answers
Posted on May 9, 2019

Last Updated on May 23, 2019 by Admin

NDG Linux Essentials 2.0 Final Comprehensive Exam (Chapter 1-


18) Answers
1. Embedded Systems means:
o Companies must share their changes
o You can view the software’s source code
o Businesses cannot charge anything for the software, only the hardware
o Systems designed to do a specific task on hardware optimized for only that purpose
o Users must support the systems themselves
2. Linux originally only ran on:
o Xerox copy machines
o Specialized processor chips
o Intel 386 PCs
o Raspberry Pi computers
o Macintosh
3. Bundling utilities, management tools, and application software with a Linux kernel
is called a:
o A trademark
o A distribution of Linux
o A type of hardware
o A text editor
4. A software release cycle describes:
o How often security fixes are implemented
o How often the software’s memory is released back to the operating system
o How often upgrades come out for software
o How often the computer must be rebooted
o How often the computer must be upgraded to support new software
5. Apple’s OS X is:

(choose three)
o A fully certified UNIX distribution
o Tightly integrated with Apple hardware
o Partially based on code from the FreeBSD project
o Primarily used to manage network services
o Derived from Linux
o Able to natively run Windows binaries
6. Microsoft Windows:

(choose three)

o Is generally backwards compatible with previous versions


o Offers both desktop and server products
o Has a Linux compatibility mode
o Has a short maintenance cycle
o Has a scripting environment called PowerShell
o Has a new desktop version every year.
7. An interpreted programming language:

(choose two)

o Requires a compilation step but no linking step


o Is converted into machine specific instructions as the program runs
o Tends to offer more features than compiled languages
o Requires a linking step but no compilation step
o Takes fewer resources to run than a compiled language
8. The two main families of Linux shells are:

(choose two)

o Bourne Shell
o Python Shell
o Korn shell
o Emacs
o C Shell
9. In virtualization, what are the host and guest?

(choose two)

o The host is the machine that runs the virtual machines


o The guest is the machine that runs the virtual machines
o The terms can be used interchangeably
o A host is a virtual machine
o A guest is a virtual machine
10.Cloud computing is:
o Requires fewer resources because systems are shared among many users
o Allows users in different geographical regions to work together in real time
o All are correct
o Is made possible by faster internet speeds
o Is useful for both business and home users
11.Which of the following are properties of a strong password?
(choose three)

o Based on easy to remember items like birthdays


o Long so that it can be reused on multiple sites
o Includes symbols
o At least 10 characters long
o A mix of upper and lower case
12.A license where you don’t have access to the source code is called:
o Sourceless
o Impaired source
o Open source
o Closed source
13.A copyleft provision in a software license means:
o You must provide support for your modifications
o You may not link against third party closed source software
o If you redistribute the software, you must distribute the source to any changes you make
o You must provide free copies of the software if you use it
o You give up your copyright to the software
14.The Free Software Foundation believes that:

(choose two)

o Software should be free to modify


o People should write software with no expectation of making money
o Software should not have copyright
o Software should be free to share
o No money should ever change hands
15.What does it mean when a work is placed in the public domain?
o The work was done by a government agency
o You may not use the work for commercial purposes
o The author has died
o The author has relinquished the copyright on the work
o You must redistribute changes to the software
16.The semicolon (;) can be used to separate multiple commands to be executed in
order.

True or False?

o True
o False
17.To be able to output messages to the screen, use the _______ command:
o print
o echo
o display
o type
18.The _______ command will print a list of the commands that you’ve previously
executed.
o list
o eval
o exec
o history
19.HOME is an example of _________.
o A path variable
o A local variable
o An environment variable
o An alias
o An internal command
20.The directory where additional documentation for software packages most likely
can be found is:
o /var/share/doc
o /var/lib/doc
o /usr/software/doc
o /usr/share/doc
21.To start searching a man page, the first key you press is:
o /
o f
o s
o !
22.To get help on using the info command, execute:

(choose two)

o man info
o info info
o help info
o info -q
23.The _____ command can be used to find any file, not just commands or man pages.
o whatis
o locate
o whereis
o apropos
24.Hidden files are files that begin with what character?
o A period (.)
o An asterisk (*)
o A plus (+)
o A dash (-)
25.The top-level directory on a Linux system is represented as:
o /
o /home
o /root
o C:
26.The ls command without options or arguments…
o …prompts for a directory to list.
o …lists the contents of the current directory.
o …lists the contents of a user’s home directory.
o …generates an error as this command requires arguments.
27.The command ls -S will sort files:
o By size, smallest to largest
o By modification date, newest to oldest
o By number of symlinks, largest to smallest
o By size, largest to smallest
28.When using the cp command, you must provide both a source and a destination.
True or False?

o True
o False
29.Which option can be used with the rm command to prompt before deleting?
o l
o A
o -P
o -i
30.Which command would list files that do not begin with a “T” or a “W”?
o echo /etc/[!TW]*
o echo /etc/[*TW]!
o echo /etc/!TW
o echo /etc/*[TW!]
31.In general, for which of the following would you want to use lossless compression?
o A JPEG image
o A log file
o An encrypted email
o A movie
o An mp3 audio file
32.You type gzip myfile.tar. What happens?

(choose two)

o An error; you forgot to specify the file with -f


o myfile.tar is unarchived into the current directory
o myfile.tar is removed
o An error; you forgot to pass the name of the output file
o myfile.tar.gz holds a compressed version of myfile.tar
33.Which command will show what is inside the compressed tarball with a name of
foo.tar.gz?
o tar –tf foo.tar.gz
o tar –tzf foo.tar.gz
o tar –xf foo.tar.gz
o tar –lf foo.tar.gz
o tar –tjf foo.tar.gz
34.By default, the zip command replaces uncompressed files with compressed files.

True or False?

o True
o False
35.Error messages generated by commands are sent where by default?
o STDIN
o Log files
o STDOUT
o STDERR
36.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
37.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
38.A file begins with #!/bin/csh. This means:
o This is a Perl script
o The operator should not be using /bin/csh
o C Shell compatibility mode is enabled
o Running the script will invoke /bin/csh to interpret the rest of the file
o Nothing, this is a comment
39.Most of nano’s commands take the form of:
o Alt and another character
o Escape followed by another character
o The F1 through F12 function keys
o Mouse clicks
o Control and another character
40.The if command looks for what exit code to consider a condition to be true?
o 255
o 0
o 2
o 1
o 10
41.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 $USERS –eq 5
o test $USERS,5
o test –f USERS=5
o test $USERS = 5
o test $USERS –a 5
42.Which of the following are valid partitioning types?

(choose two)

o PC
o MBR
o GPT
o BIOS
43.Software that allows hardware devices to communicate with the installed operating
system is called?
o Drivers
o Instructions
o Packages
o Programs
44.Which of the following commands will check hard disk GPT partitions?

(choose three)

o sfdisk
o sgdisk
o gdisk
o cgdisk
o gfdisk
45.The process (ps) command shows only processes running in the current shell by
default.

True or False?

o True
o False
46.The free command outputs statistics about:
o Memory usage
o Disk usage
o Software usage
o CPU usage
47.Which file contains the information passed to the kernel at boot time?
o /proc/kernel
o /proc/kopts
o /proc/kargs
o /proc/cmdline
48.To make changes permanent for kernel parameter files found under /proc/sys, the
following file can have entries added to it:
o /etc/sysinfo.conf
o /etc/sysctl.conf
o /etc/procctl.conf
o /etc/procsys.conf
49.Which of the following commands will display the IP address on a Linux system?
o ifconfig
o route
o ipconfig
o dig
50.The RSA key fingerprint allows the dig command to connect to remote systems.

True or False?

o True
o False
51.When issuing the service network restart command, which of the following occurs?
o …takes down all network interfaces, re-reads all related configuration files and then the
networking for the system is restarted.
o …the networking for the system is stopped and then started back up.
o …brings up all network interfaces, re-reads all related configuration files and then the
networking for the system is restarted.
52.Which of the following commands can be used to display socket statistics, and
supports all major packet and socket types?
o route
o ss
o ifconfig
o top
53.Which of the following commands will display the groups that the user bob belongs
to?
o group bob
o id bob
o all bob
o groups -a
54.Traditional UNIX systems allowed users to belong to how many groups?
o 65,000
o 10,000
o 1
o 256
o 16
55.A value of 0 in the “minimum” password aging field means the user cannot change
their password.

True or False?

o True
o False
56.Sudo privileges allow users to execute commands as another user.

True or False?

o True
o False
57.The first line of this command displays how long the system has been running since
being rebooted.
o id
o getent
o who
o w
o su
58.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 -S
o -s
o -G
59.The groupmod command can be used to add users to a group.

True or False?

o True
o False
60.Which of the following files contains user IDs?
o /etc/passwd
o /etc/shadow
o /etc/group
o /etc/usr
61.Which of the following commands, run as root, will prevent the user bob from
logging in?
o usermod -L bob
o usermod -D bob
o usermod -d bob
o usermod -l bob
62.What directory contains a user’s home directory?
o /rootfs
o /user
o /
o /home
63.GIDs under 500 (or 1000) are usually reserved for what kind of groups?
o Are not used for groups, but for user accounts
o Administrators
o User private groups (UPG)
o System use
64.A user cannot delete a file if they do not own it.

True or False?

o True
o False
65.The chown command permits changing group ownership done by root only.

True or False?

o True
o False
66.Which of the following commands will list hidden files as well as their ownership?
o ls -a
o ls -z
o ls -l
o ls -la
67.Which of the following commands will set setuid for /usr/bin/program?
o chmod 1755 /usr/bin/program
o chmod 4755 /usr/bin/program
o chmod 2755 /usr/bin/program
o None of the above
68.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 …is not allowed by the system.
o …does nothing.
69.Deleting a source file will break an associated hard link.

True or False?

o True
o False
70.Which of the following commands would create a hard link, link to file?
o ln file link
o ln -s link file
o ln link file
o ln -s file link
o

The > character is used for which of the following file descriptors?

STDIN

STDERR

STDOUT

Which of the following commands will display the last five lines of a file called file1.txt?

(choose two)

tail -5 file1.txt

tail -n 5 file1.txt

head -n 5 file1.txt

tail file1.txt

NDG Linux Essentials 2.0 Chapter 2 Exam


Answers
Posted on May 9, 2019

Last Updated on May 9, 2019 by Admin

NDG Linux Essentials 2.0 Chapter 2 Exam Answers


1. When choosing a distribution of Linux, you should consider:

(choose four)

o Does your organization require long-term support for the system


o Does the distribution offer a “stable” version
o If the application software is supported by the distribution
o Will commercial support be required for the OS
o Popularity on social media
2. Embedded Systems means:
o Users must support the systems themselves
o You can view the software’s source code
o Companies must share their changes
o Businesses cannot charge anything for the software, only the hardware
o Systems designed to do a specific task on hardware optimized for only that purpose
3. The most popular Linux platform for mobile phones is:
o IOS
o Android
o BlackBerry
o Slackware
o MobileLinux
4. Linux distributions use this to add and remove software from the system:
o Application Programming Interface (API)
o Partitioning tool
o Package manager
o Bash
o Compiler
5. In Linux, RPM can be defined as:
o Random program memory
o Relational peak monitoring
o Radical performance machine
o The speed a record plays back at
o The Package Manager program for Red Hat Linux
6. Linux originally only ran on:
o Macintosh
o Intel 386 PCs
o Raspberry Pi computers
o Specialized processor chips
o Xerox copy machines
7. A long software release cycle is:
o Better because old hardware can be utilized beyond its service life
o Only offered by Red Hat and SUSE
o Makes programming more difficult since new features cannot be used
o Valued by businesses that want stability
o Characterized by infrequent security fixes
8. Which distribution is related to Red Hat?
o Raspbian
o Debian
o Ubuntu
o Slackware
o Fedora
9. SUSE is derived from which distribution?
o Fedora
o Debian
o Red Hat Enterprise Linux
o Slackware
o Scientific Linux
10.IoT is one application of embedded systems:

True or False?
o True
o False
11.Artificial intelligence has little potential for gains in efficiency, safety and
productivity.
o True
o False
12.The Raspberry Pi is popular with experimenters because:
o It runs Microsoft Office
o End users have to pay for programming expenses
o It’s cheap and adaptable
o The hardware never changes
o It takes months or years to develop an application
13.The release cycle:
o Only has meaning for paid software
o Should be short so you always have the freshest releases
o Should be long so that you have time before you need to upgrade
o Describes how long software will be supported
o Dictates how often software is updated
14.Debian is a community effort that supports many hardware platforms

True or False?

o True
o False
15.Linux Mint is:
o Compatible with Android systems
o A fork of Ubuntu Linux
o A proprietary version of Ubuntu with advanced features
o A refreshing after dinner treat
o Distributed in every country without license restrictions
16.A computer running Linux can:
o Outperform proprietary systems at certain tasks
o All of the above
o Function as a web server
o Serve a government agency
o Be used to create new programs
17.Bundling utilities, management tools, and application software with a Linux kernel
is called a:
o A distribution of Linux
o A text editor
o A type of hardware
o A trademark
18.A network of inexpensive computers connected to sensors and controllers is called:
o Internet of Things (IoT)
o Creative commons
o Open source networking
o Closed source computing
o Relationational database
19.The Linux platform that runs on mobile phones is called:
o MicroLinux
o IOS
o Android
o Teledroid
o LinuxMobile
20.What does a distribution provide to add and remove software from the system?
o Compiler
o Application Programming Interface (API)
o Bash
o Package Manager
o Partitioning tool
21.A software release cycle describes:
o How often upgrades come out for software
o How often the software’s memory is released back to the operating system
o How often the computer must be upgraded to support new software
o How often security fixes are implemented
o How often the computer must be rebooted
22.Which distributions are made by, or are clones of, RedHat?

(choose two)

o Debian
o CentOS
o Fedora
o Ubuntu
o Slackware
23.Ubuntu is derived from which distribution?
o Slackware
o Debian
o Scientific Linux
o Red Hat Enterprise Linux
24.The most important consideration when choosing an operating system is:
o What the intended use of the system is
o How much performance is needed
o The licensing model of the operating system
o The total cost of ownership
o Whether or not it is cloud-friendly
25.A maintenance cycle:
o Describes how often updates for software come out
o Should be short so you always have the freshest releases
o Only has meaning for paid software
o Should be long so that you have time before you need to upgrade
o Describes how long a version of software will be supported
26.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
27.Software is backward compatible if:
o It can be upgraded without downtime
o People still use old versions
o It still supports old file formats or applications
o If the next version still works the same way
o It works across Linux/Mac/Windows
28.Apple’s OS X is:

(choose three)

o Derived from Linux


o Able to natively run Windows binaries
o Primarily used to manage network services
o A fully certified UNIX distribution
o Tightly integrated with Apple hardware
o Partially based on code from the FreeBSD project
29.Microsoft Windows:

(choose three)

o Has a scripting environment called PowerShell


o Is generally backwards compatible with previous versions
o Offers both desktop and server products
o Has a short maintenance cycle
o Has a Linux compatibility mode
o Has a new desktop version every year.
30.When choosing a distribution of Linux, you should consider:

(choose five)

o Does the distribution offer a “stable” version


o Will users require a GUI
o Will commercial support be required for the OS
o Does your organization require long-term support for the system
o Popularity on social media
o If the application software is supported by the distribution
o

NDG Linux Essentials 2.0 Chapter 3 Exam Answers


1. The Samba application is a:
o Security Server
o File Server
o Mail Server
o Web Server
2. Which of the following are examples of desktop software?

(choose two)

o Music player
o File share
o Web browser
o Compiler
o Web server
3. If you wanted to set up a blog, which software would be most helpful?
o Samba
o MySQL
o Postfix
o Dovecot
o WordPress
4. Which of the following pieces of software deal with file sharing?

(choose three)

o X-Windows
o PostgreSQL
o Netatalk
o Samba
o NFS
5. If you wanted to create and print an invoice, which software could you use?
o Evolution
o LibreOffice
o GNOME
o Compiz
o Firefox
6. POP and IMAP are related to:
o Serving web pages
o Reading and writing music
o Email
o Letting users log in to multiple servers with 1 set of credentials
o Sharing files
7. When a computer boots, it can get its network information through:
o LDAP
o DNS
o DHCP
o SMTP
o X11
8. Which of the following are examples of text editors?

(choose four)

o nano
o Yum
o pico
o vim
o emacs
9. A package manager:

(choose two)

o Downloads software from the Internet


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
o Emails you when software is out of date
10.An interpreted programming language:

(choose two)

o Takes fewer resources to run than a compiled language


o Is converted into machine specific instructions as the program runs
o Requires a linking step but no compilation step
o Tends to offer more features than compiled languages
o Requires a compilation step but no linking step
11.Which of the following are true about compiled programming languages?
o Ruby is a compiled language
o Compiled languages are great for system administration tasks like scripting
o C 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 tar
o bash
o yum
o vim
o apt-get
13.The Linux shell:

(choose three)

o Is customizable
o Has a built-in text editor
o Allows you to launch programs
o Has a scripting language
o Is responsible for tracking the location of configuration files
14.Which application would you use to edit and piece together sound files to make a
podcast?
o Audiolicious
o GIMP
o Thunderbird
o Bash
o Audacity
15.The two main families of Linux shells are:

(choose two)

o Emacs
o C Shell
o Bourne Shell
o Python Shell
o Korn shell
16.Which server software would you use to create a company directory that you could
search and authenticate against?
o bind
o OpenLDAP
o Samba
o ISC DHCP
o Netatalk
17.A Mail Transfer Agent’s primary purpose is to:
o Serve email to end clients
o Deliver mail between servers
o Manage the end user’s inbox
o Filter out spam
o Act as a gateway between faxes and email
18.Which of the following are examples of a web server?

(choose two)

o NFS
o postfix
o WordPress
o Nginx
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.Virtualization means:
o A user can connect to a server over the network and use a virtual console
o Many users can share one hard drive
o A machine can swap memory to disk
o A single host can be split up into multiple guests
o Two users get different memory spaces on the same machine
21.In virtualization, what are the host and guest?

(choose two)

o The terms can be used interchangeably


o A guest is a virtual machine
o A host is a virtual machine
o The host is the machine that runs the virtual machines
o The guest is the machine that runs the virtual machines
22.Which of the following are traits of cloud computing?

(choose two)

o You don’t have to worry about performance any more


o Resources can be accessed from anywhere over a network
o Scales IT resources so you pay for what you use
o You own the hardware but pay for it over time
o Only Linux works in cloud computing
23.If you wanted to write a report that was to be printed, you would probably use:
o A wiki
o Adobe Flash
o Firefox
o Chrome
o LibreOffice
24.To protect your privacy online, you can configure your computer to check for
updates periodically.

True or False?

o True
o False
25.Which of the following is a tool that helps you anonymize your Internet browsing?
o Web proxy
o Tor Browser
o Iptables
o AnonFirefox
o CookieCleaner
26.Cloud computing is:
o Is made possible by faster internet speeds
o Is useful for both business and home users
o Allows users in different geographical regions to work together in real time
o Requires fewer resources because systems are shared among many users
o All are correct
27.The term for individual computers running multiple systems at the same time is:
o MultiRun
o Cloud priority
o Distribution
o Virtualization
o Googleization
28.Which of the following are traits of a multiuser operating system?

(choose three)

o Many users can log in simultaneously with a unique account


o Users can protect their information from other users
o Resources are shared between users
o Each user can only log in once per day
o An administrative user gets a dedicated CPU
29.If you want to store logins and passwords for different websites in a secure manner,
you could use:
o A text file in your home directory
o A LibreOffice document
o A sticky note on your monitor
o KeePassX
o In a spiral bound notebook in your file cabinet
30.Two components that provide the ability to implement a firewall include:

(choose two)

o iptables
o gufw
o ifconfig
o Cerberus
o ipfw
31.What are tradeoffs of increasing the level of privacy you have in your web browser?

(choose two)

o You may have to explicitly permit some cookies to be saved


o Sites may not work properly
o You may get viruses
o Websites may load slower
o Images won’t load properly
32.Social network “like” buttons can track your activity across the Internet.

True or False?

o True
o False
33.Which of the following are properties of a strong password?

(choose three)

o At least 10 characters long


o Based on easy to remember items like birthdays
o Includes symbols
o Long so that it can be reused on multiple sites
o A mix of upper and lower case
34.What can be done to prevent unauthorized users from accessing your computer
remotely?

(choose two)

o Block third party cookies


o Turn on a firewall
o Block all cookies
o Use strong passwords on all user accounts
o Don’t use wireless networks – only wired
35.In graphical mode, you can get to a shell by running which applications?

(choose two)

o Terminal
o Gbash
o console
o Xterm
o Guiterm

NDG Linux Essentials 2.0 Chapter 4 Exam Answers


1. Linux source code is available to:
o Employees of the FBI, CIA and NSA with top secret clearance
o Anyone who has the knowledge needed to access it
o Only university researchers with a government grant
o Only employees of the Linux Foundation
2. Source code refers to:
o The version of a program that the computer runs on the CPU
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 A human-readable version of computer software
3. Open source means:

(choose two)

o You can view the software’s source code


o You must share your changes
o You can modify the software’s source code
o You cannot charge anything for the software
o You must support the software you share
4. 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
5. Open source licenses differ, but generally agree that:

(choose two)

o You are not allowed to sell the software


o You must redistribute your changes
o You should be able modify the software as you wish
o You should have access to the source code of software
6. Richard Stallman is associated with:
o BSD Unix
o Microsoft
o The Free Software Foundation
o The Apache foundation
o The Open Source Initiative
7. A copyleft provision in a software license means:
o You may not link against third party closed source software
o If you redistribute the software, you must distribute the source to any changes you make
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
8. The largest difference between the GPLv2 and BSD licenses is:
o Nothing, they are virtually identical
o BSD has no copyleft provision
o GPLv2 requires assigning copyright to the FSF
o GPLv2 is not approved by the OSI
o Only BSD allows commercial use
9. The Free Software Foundation believes that:

(choose two)
o Software should be free to modify
o Software should be free to share
o Software should not have copyright
o People should write software with no expectation of making money
o No money should ever change hands
10.Which of the following licenses was made by the FSF?
o Creative Commons
o GPLv3
o Apache
o BSD
o MIT
11.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 the software in the public domain
o Places no restrictions on sharing modifications
o Requires you share software changes but not binaries
12.Linux is distributed under which license?
o GPLv3
o BSD
o Linux Foundation
o MIT
o GPLv2
13.Who founded the Open Source Initiative?

(choose two)

o University of California at Berkeley


o Richard Stallman
o Bruce Perens
o Linus Torvalds
o Eric Raymond
14.A generic term for Open Source and Free Software is:
o SLOFF
o OS/FS
o FLOSS
o GPL
o Libre Software
15.Which are examples of permissive software licenses?

(choose two)

o BSD
o LGPLv3
o GPLv3
o GPLv2
o MIT
16.What does it mean when a work is placed in the public domain?
o The work was done by a government agency
o You may not use the work for commercial purposes
o The author has died
o The author has relinquished the copyright on the work
o You must redistribute changes to the software
17.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 Allow or disallow commercial use
o Specify whether or not changes must be shared
o Get a veto on where the work is used
18.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 Share it as long as you give credit to the author
o Sell it as part of a compilation
o Add ads to it and post it to your website.
19.How can you make money from open source software?

(choose three)

o Unlock premium features for people that pay


o Sell hardware that’s built to work with the software
o Take payments for fixing bugs
o Charge a yearly fee for the right to use the software
o Provide paid consulting services for users
20.The difference between the GPL and LGPL licenses are:
o LGPL applies to web services
o LGPL ensures that all variants of the original GPL program has the same freedom of use as
the original
o LGPL allows you to distribute the software in binary-only form
o LGPL is shorter than GPL
o LGPL was made by the OSI while GPL was made by the FSF
21.Permissive free software licenses:

(choose three)

o Can allow software to be used inside closed source software


o Include the GPLv2 and BSD
o Are not approved by the FSF
o Don’t have a copyleft provision
o Are not approved by the OSI
22.The Creative Commons version of Public Domain licensing is:
o NoAttribution-ShareAlike (CC BY-SA)
o Attribution-NonCommercial (CC BY-NC)
o Attribution (CC BY)
o No Rights Reserved (CC0)
o Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)
23.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 There are no requirements
o You must make the source to your kernel available
o You must make your hardware designs available
o You must make the source to your custom web interface available

--------------------------------------------------------------------------------4-----------------------------------------

NDG Linux Essentials 2.0 Chapter 5 Exam Answers


1. Which environment variable contains a list of directories that is searched for
commands to execute?
o PATH
o PS1
o PS2
o EXEC
2. Select the command that can report the location of a command:
o what
o which
o where
3. A pair of single quotes ( ‘ ) will prevent the shell from interpreting any
metacharacter.

True or False?

o True
o False
4. A pair of double quotes (” ) will prevent the shell from interpreting any
metacharacter.

True or False?

o True
o False
5. 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
6. The semicolon (;) can be used to separate multiple commands to be executed in
order.

True or False?

o True
o False
7. 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
o False
8. To be able to output messages to the screen, use the _______ command:
o echo
o print
o display
o type
9. The _______ command will print a list of the commands that you’ve previously
executed.
o list
o eval
o history
o exec
10.To execute the same command as previously executed five commands ago, you
would type:
o @-5
o !5
o !-5
o &5
11.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
12.The acronym CLI stands for:
o Computer Line Interface
o Command Line Interpreter
o Command Line Interface
o Computer Link Interpreter
13.What one character treats the character that follows it as if it was surrounded by
single quotes?
o /
o #
o %
o \
14.The echo command:
o Copies variables from one to another
o Tests a variable for duplication
o Is used for variable assignment
o Is used to output text to the console
o Duplicates the input stream to the output stream
15.The most common shell used for Linux distributions is the ________ shell.
o Fish
o Bash
o Tsch
o Zsh
16.HOME is an example of _________.
o An environment variable
o A path variable
o A local variable
o An internal command
o An alias

---------------------------------------------------------------5-----------------------------------------------------

NDG Linux Essentials 2.0 Chapter 6 Exam Answers


1. What is the standard option to provide a command line program to view its
documentation?
o -h
o –info
o –help
o –doc
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 False
o True
4. The directory where additional documentation for software packages most likely
can be found is:
o /usr/software/doc
o /var/lib/doc
o /usr/share/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 grep
o less
o page
o more
6. Commands typically executed by a user are covered in what section of the manual?
o 5
o 3
o 2
o 1
7. To search the man page sections for the keyword example, which of the following
command lines could you execute?

(choose two)

o man -k example
o apropos example
o man -f example
o whatis example
8. The statement that describes the difference between a man page and an info page is:
o The man page is like a guide; the info page is a more concise reference.
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.
o There is very little difference between them.
9. If you are reading the synopsis of a command from a man page, then items in square
brackets are:
o Required arguments
o Comments
o Optional
o Required options
10.The following sections commonly appear on a man page:

(choose three)

o NAME
o LICENSE
o DESCRIPTION
o SYNOPSIS
11.Section 5 of the manual pages covers:
o System administration commands
o Games
o User commands
o File Formats
12.To start searching a man page, the first key you press is:
o f
o /
o s
o !
13.In order to exit viewing a man page, press:
o q
o z
o x
o y
14.To get help on using the info command, execute:

(choose two)

o man info
o info -q
o info info
o help info
15.To get help while using the info command, press:
o g
o A
o Shift+H
o Shift+z
16.To exit the info page, press:
o Q
o x
o z
o x
17.When interpreting the SYNOPSIS of a command found on a man page, the “|”
means:
o The items it separates can be used together
o The items it separates cannot be used together
18.The _____ command is normally executed daily to update the database of all files
that are on the system.
o find
o locate
o search
o updatedb
19.The _____ command is normally executed to search for a command or man page.
o updatedb
o whereis
o find
o man -k
20.The _____ command can be used to find any file, not just commands or man pages.
o apropos
o whereis
o whatis
o locate
21.The info command merges all available documentation into a single “book”.

True or False?

o True
o False
22.Section 9 of man pages relates to what?
o Library Calls
o Games
o Kernel Routines
o System Calls
o Miscellaneous
23.The man command searches each of the sections in order until it finds a match.

True or False?

o
o True
o False
24.The whatis command will only return the first result for which section a man page
is stored in.
True or False?

o True
o False

----------------------------------------------------------------------6----------------------------------------------------

NDG Linux Essentials 2.0 Chapter 7 Exam Answers


1. Hidden files are files that begin with what character?
o A plus (+)
o An asterisk (*)
o A dash (-)
o A period (.)
2. What option for the ls command will display all files, including hidden files?
o -a
o -L
o -H
o -w
3. The top-level directory on a Linux system is represented as:
o /home
o C:
o /root
o /
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 Absolute
o Relative
7. The tilde (~) is used to represent:
o Any two single characters
o Nothing; it has no special meaning
o The directory above the current working directory
o A user’s home directory
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 &&
o cd /home/bob
o cd ~bob
o ~bob
9. The double dot (..) can be used with the cd command to represent:
o A user’s home directory.
o Any two single characters
o Nothing; it has no special meaning.
o The directory above the current working directory
10.The cd command by itself will take you to what directory?
o None; it is not a valid command
o The system root directory
o Your home directory
o The directory above the current working directory
11.What command will allow you to change your current working directory?
o list
o chdir
o ls
o cd
12.The double dot (..) can be used to represent the directory…
o …below the current directory.
o …above 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 …prompts for a directory to list.
o …generates an error as this command requires arguments.
o …lists the contents of a user’s home directory.
o …lists the contents of the current directory.
14.The first character in a long listing (ls -l) indicates:
o The permissions
o The owner
o If something is a file, directory, or symbolic link
o The size
15.Which option for the ls command, when used in conjunction with the -l option, will
display human-readable file sizes?
o -S
o -H
o -h
o -M
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 modification date, newest to oldest
o By size, largest to smallest
o By number of symlinks, largest to smallest
o By size, smallest to larges

--------------------------------------------------------------------------7----------------------------------------------

NDG Linux Essentials 2.0 Chapter 8 Exam Answers


1. When using the cp command, you must provide both a source and a destination.

True or False?

o True
o False
2. Which option(s) can be used to prevent cp from overwriting an existing file?

(choose two)

o -z
o -n
o -N
o -i
3. The command rm -r will…
o remove a directory along with any files or subdirectories.
o generate an error; -r isn’t a valid option.
o remove only empty directories.
o prompt for each confirmation before deleting each file in a directory.
4. Which option can be used with the rm command to prompt before deleting?
o A
o -P
o l
o -i
5. The rm command can delete multiple files at once.

True or False?

o True
o False
6. Which of the following commands can be used to rename a file?
o cp
o rm
o mv
o name
7. The touch command can be used to:

(choose two)

o Update the timestamp of existing files


o Change ownership of a file
o Create new files
o Change a file’s name
8. Which of the following are glob characters?

(choose three)

o The square brackets “[” and “]”


o The question mark “?”
o The dash character “-“
o The asterisk “*”
9. The main purpose of using glob characters is to be able to provide a list of filenames
to a command.

True or False?

o True
o False
10.The asterisk character is used to represent zero or more of any character in a
filename.

True or False?

o True
o False
11.Which of these commands will return /etc/gai.conf /etc/pam.conf /etc/ucf.conf?

(choose two)

o ls /etc/???.????
o echo /etc/???.*f
o echo /etc/*?.*o?
o ls /etc/p???.**
12.Brackets cannot be used to a represent a range of characters.

True or False?

o True
o False
13.Which command would list files that do not begin with a “T” or a “W”?
o echo /etc/*[TW!]
o echo /etc/!TW
o echo /etc/[!TW]*
o echo /etc/[*TW]!

-------------------------------------------------------------------------------8--------------------------------------------------

NDG Linux Essentials 2.0 Chapter 9 Exam Answers


1. Compression of a file works by:
o Eliminating gaps within the file
o Consolidating multiple files into one
o Removing redundant information
o Storing most of the data on removable media and just leaving a pointer
o Removing the high order bit from each byte
2. In general, for which of the following would you want to use lossless compression?
o An mp3 audio file
o An encrypted email
o A JPEG image
o A log file
o A movie
3. Lossy compression:
(choose three)
o Usually results better compression than lossless
o Is often used with images
o Is often used with documents
o Decompresses to an identical version as the original
o Sacrifices some quality
4. You type gzip myfile.tar. What happens?

(choose two)

o myfile.tar is unarchived into the current directory


o An error; you forgot to pass the name of the output file
o myfile.tar.gz holds a compressed version of myfile.tar
o An error; you forgot to specify the file with -f
o myfile.tar is removed
5. How would you obtain output similar to the following?
6. compressed uncompressed ratio uncompressed_name
7.
278168 1016950 72.6% tags

o gzip –l tags
o gunzip –t tags
o file tags
8. Which command would you use to archive the Documents directory and compress it
with bzip2 compression?
o tar –fzc Documents documents.tbz
o tar –cf Documents documents.tbz
o tar –cjf Documents
o tar –cjf documents.tbz Documents
o tar –czf documents.tbz
9. Which flag would you pass to tar in order to have it make a new archive?
o -t
o -c
o -n
o -x
o -j
10.Which command will show what is inside the compressed tarball with a name of
foo.tar.gz?
o tar –tjf foo.tar.gz
o tar –lf foo.tar.gz
o tar –tf foo.tar.gz
o tar –xf foo.tar.gz
o tar –tzf foo.tar.gz
11.In the command tar -cvjf foo.tbz a b c, what are a, b, and c?
o Nothing; -cvjf only expects one parameter
o File names to be added to the archive
o a is the directory that will be prepended to files; b and c are files inside it
o Matching operators; anything starting with a, b, or c will be added
o Extra flags passed to tar
12.Given the command tar –cvjf homedirs.tbz /home, which of the following are true?

(choose two)

o Only files starting with /home will be extracted from the archive
o The command will print out each filename as it is processed
o The /home directory will be restored with the contents of homedirs.tbz
o Files that are present in the archive might overwrite files in /home
o The output file will be compressed
13.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?

o tar –xzf backup.tar.gz home/fred/


o tar –tjf backup.tar.gz /home/fred
o tar –xjf backup.tar.gz home/fred/
o tar –xzf backup.tar.gz fred
o tar –tzf /home/fred < backup.tar.gz
14.Which of the following commands will create a zipfile with the contents of your
Documents directory?
o zip –f mydocs.zip Documents
o zip -r mydocs.zip Documents
o zip –c mydocs.zip Documents
o zip mydocs.zip Documents
o zip -cf mydocs.zip Documents
15.Given a file called documents.zip, how can you see what’s in it without extracting the
files?
o zip -lf documents.zip
o unzip -l documents.zip
o unzip –list documents.zip
o zip -l documents.zip
o showzip documents.zip
16.Given a file called documents.zip, how can you extract just the files under ProjectX?
o unzip documents.zip ProjectX/*
o unzip documents.zip | grep ProjectX
o unzip documents.zip ProjectX
o zip -x documents.zip ProjectX
o unzip -t documents.zip ProjectX
17.You try to compress a file that is already compressed. Which of the following
statements is true?
o The file will not be compressed any further than it already was
o The compression algorithm needs to be set to the “currently compressed” mode for it to be
compressed further
o The file changed while you were compressing it
o The file will be deleted
o The file will actually be uncompressed
18.Which of the following commands can be used to compress a file?

(choose three)

o bunzip2
o cat
o zip
o bzip2
o gzip
19.The three main modes of tar are:

(choose three)

o List
o Create
o Compress
o Copy
o Extract
20.In the command tar -czf foo.tar.gz bar, what is the purpose of the f flag?
o Tells tar to copy only files, and not directories
o Tells tar to read from the file that follows the flag
o Tells tar to write to the file that follows the flag
o Tells tar to print the name of each file as it is processed
o Specifies extra compression is to be used
21.Which two commands do the same thing?

(choose two)

o tar -czf foo.tar.gz foo


o tar -tzf foo.tar.gz
o tar -c foo | gzip > foo.tar.gz
o tar -x foo | gzip
o tar -xzf foo.tar.gz
22.Which two programs use the Lempel-Ziv-Markov chain algorithm?

(choose two)

o xz
o lossless
o lossy
o bzip
o gzip
23.By default, the zip command replaces uncompressed files with compressed files.

True or False?

o True
o False
-------------------------------------------------------------------------------9----------------------------------------------

NDG Linux Essentials 2.0 Chapter 10 Exam Answers


1. Error messages generated by commands are sent where by default?
o STDERR
o STDIN
o Log files
o STDOUT
2. A successful command may, or may not 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?
o ls /root >> error.log
o ls /root > error.log
o ls /root 2> 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.
o …send the output of one command to another.
o …send the output of a command to a file.
5. Channel 2 is:
o STDOUT
o STDALL
o STDERR
o STDIN
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 echo list.file > sort
o cat list.file | sort
8. Which option of the head command will display only the first five lines of a file?
o No option needed; head displays only five lines by default.
o -n
o -l 5
o -n 5
9. The grep command…
o …will display all the lines that begin with the specified Regular Expression.
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.
o …is not case sensitive.
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
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 more
o cat
o less
15.Which option for the cut command is used to specify a delimiter?
o -D
o -f
o =
o -d
16.Which option for the cut command is used to specify the field?
o -d
o #
o -D
o -f
17.Which option for the wc command will print the number of lines in a file?
o -w
o -l
o -L
o -C
18.Which option for the wc command will print the total number of words in a file?
o -l
o -C
o -L
o -w
19.Which command can be used to print line numbers?
o num
o nl
o ln
o sort
20.The command echo "text" > file.txt will create file.txt if it does not already exist.

True or False?

o True
o False
21.The command echo "text" > file.txt will not overwrite file.txt if it already exists.

True or False?

o True
o False
22.The command echo "text" >> file.txt will not overwrite file.txt if it already
exists.

True or False?

o True
o False

------------------------------------------------------------------------------------10--------------------------------------

NDG Linux Essentials 2.0 Chapter 11 Exam Answers


1. A file begins with #!/bin/csh. This means:
o This is a Perl script
o The operator should not be using /bin/csh
o C Shell compatibility mode is enabled
o Running the script will invoke /bin/csh to interpret the rest of the file
o Nothing, this is a comment
2. Which are appropriate editors for writing shell scripts?
(choose two)
o Firefox
o /bin/bash
o LibreOffice Writer
o vi
o nano
3. Most of nano’s commands take the form of:
o Mouse clicks
o Escape followed by another character
o Control and another character
o The F1 through F12 function keys
o Alt and another character
4. What does this shell script do?
5. FOO=/tmp/foo
6. if [ ! –d $FOO ]; then
7. mkdir $FOO
fi
o Creates /tmp/foo if it does not exist
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
o Makes the /tmp/foo directory if a file by that name exists
8. Which of the following are correct about for and while loops?

(choose two)

o for loops have a test each cycle to determine if it should run again
o for loops operate over a fixed list of items
o for loops require a variable over which to iterate
o while loops operate over a fixed list of items
o while loops have a test each cycle to determine if it should run again
9. Given the following part of a script:
10. if [ -f $1 ]; then
11. echo “I am here”
12. fi

What is the meaning of $1?

o It is a parameter to -f, indicating the size of the file


o It is the first argument passed to the script
o It is a special variable that indicates the exit code of the command before it
o It is a file called $1
o It is a list of files that gets interpolated
13.Given the following script that is run through ./test.sh hello goodbye:
14. if [ -f $2 ]; then
15. echo "I am here"
16. fi

When will “I am here” be printed?

o If a file called “goodbye” exists in the current directory


o Never
o The script will always print “I am here”
o If there are two files in the current directory
o If a file called “hello” exists in the current directory
17.What is the correct way to assign the word “Hello” to a variable?
o A = “Hello”
o echo “Hello” &gt; A
o echo $A “Hello”
o $A=”Hello”
o A=”Hello”
18.What is the correct way to save the current directory to a variable?
o A=`pwd`
o pwd | $A
o A=cwd
o A=pwd
o pwd $A
19.Which shell command accepts input from the user’s keyboard?
o echo
o read
o gets
o input
o $1
20.What information is held inside $? ?
o The name of the command run
o The previous command’s exit code
o The number of arguments passed to the script
o The current process id
o The current user ID
21.How would you finish your script with an exit code of 42?
o return 42
o break 42
o CODE=42
o exit 42
o $?=42
22.The if command looks for what exit code to consider a condition to be true?
o 1
o 0
o 2
o 10
o 255
23.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 $USERS –eq 5
o test –f USERS=5
o test $USERS = 5
o test $USERS,5
o test $USERS –a 5
24.Given the following script:
25. while [ ! –f /tmp/foo ]; do
26. echo –n “.”
27. process_data > /tmp/foo
28. done

Which of the following are true?

(choose two)

o The screen will fill with dots.


o If a file called /tmp/foo exists, process_data won’t be run
o process_data will be called at most once
o process_data will never be run
o /tmp/foo will be removed if it exists
29.A conditional that lets you make multiple comparisons with a pattern is called:
o fanout
o case
o if
o branch
o test
30.What is the meaning of $(( $i + 1)) ?
o 1 will be added to the i variable
o If i is 0, the loop will stop
o This will return the value of the next argument to the script
o This will return the value of the first argument to the script
o This runs the command stored in variable i
31.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 –o $USERS –gt 5
o test –d /tmp/foo | $USERS > 5
o test /tmp/foo || $USERS > 5
o test /tmp/foo –d –o $USERS -gt 5

--------------------------------------------------------------------11-----------------------------------------------

NDG Linux Essentials 2.0 Chapter 12 Exam Answers


1. Which of the following are valid CPU types for Intel-based platforms?
(choose two)
o 64-bit
o 32-bit
o 48-bit
o 24-bit
2. 64 bit platforms can access more memory than 32 bit platforms.

True or False?

o True
o False
3. Choose all of the following statements that are true in regard to virtual RAM:
(choose three)
o Virtual RAM is stored on a hard drive
o Virtual RAM is stored in the CPU
o Virtual RAM is used when available physical RAM is low.
o Virtual RAM is also called swap space
4. Which of the following are common busing systems?

(choose two)

o CPU
o BIOS
o USB
o RAM
o PCI
5. A division of a hard drive may be referred to as a _______ .
o block
o partition
o portion
o label
6. Which of the following are valid partitioning types?

(choose two)
o GPT
o PC
o MBR
o BIOS
7. The fdisk command is a tool used for working with the MBR partitioned disks.

True or False?

o True
o False
8. 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
9. Which of the following are valid video cable connector types?
(choose two)
o HDA
o VGA
o AMD
o DVI
10.Which of the following commands will display CPU information?

(choose two)

o lscpu
o cpuinfo
o lspic
o arch
o showcpu
11.What are the advantages of solid state disks when compared to traditional spinning
platter hard disks?

(choose two)

o Less heat
o Faster system boot times
o Higher capacity
o Low cost
o Low power consumption
12.Software that allows hardware devices to communicate with the installed operating
system is called?
o Instructions
o Drivers
o Packages
o Programs
13.Which of the following commands will check hard disk MBR partitions?

(choose three)
o fdisk
o gfdisk
o gdisk
o cfdisk
o sfdisk
14.Which of the following commands will check hard disk GPT partitions?

(choose three)

o gdisk
o sgdisk
o sfdisk
o gfdisk
o cgdisk
o ---------------------------------------------------------------12-----------------------------------------
o

NDG Linux Essentials 2.0 Chapter 13 Exam Answers


1. When you execute the dmesg command, the system displays messages that are
generated by the kernel.

True or False?

o True
o False
2. The Linux kernel mounts the following pseudo-filesystems to provide access to
information about hardware devices connected to the system:

(choose two)

o
o /devices
o /proc
o /info
o /sys
3. The /proc directory contains a subdirectory for each process present on the system.

True or False?

o True
o False
4. The Process ID (PID) of the init process is:
o 0
o 1
o 100
o varies
5. The process (ps) command shows only processes running in the current shell by
default.
True or False?

o True
o False
6. The following system load averages are displayed by the top command:

(choose three)

o 15 minute
o 1 minute
o 10 minute
o 5 minute
7. The free command outputs statistics about:
o CPU usage
o Software usage
o Memory usage
o Disk usage
8. What directory typically contains log files?
o /proc/loc
o /log
o /usr/log
o /var/log
9. Which log file contains messages regarding authentication and authorization?
o secure
o dmesg
o syslog
o messages
10.All log files contain only text data.

True or False?

o True
o False
11.A load average of 1.0 always means the system is fully loaded.

True or False?

o True
o False
12.A command that will continuously update statistics about running processes:
o tail
o head
o top
o Bottom
13.Which of the following is a valid Linux option style for Traditional Unix:
o two dashes (–)
o slash (/)
o no dash
o a single dash (-)
14.Which file contains the information passed to the kernel at boot time?
o /proc/kargs
o /proc/kopts
o /proc/cmdline
o /proc/kernel
15.To make changes permanent for kernel parameter files found under /proc/sys, the
following file can have entries added to it:
o /etc/sysinfo.conf
o /etc/procctl.conf
o /etc/sysctl.conf
o /etc/procsys.conf
16.The /var directory has files that change over time.

True or False?

o True
o False
17.Information about the init process can be found in the /proc/1 directory.

True or False?

o True
o False
18.Which of the following commands will allow you to view all processes on the system?

(choose two)

o ps -ef
o ps
o ps -A
o ps aux
o ps -eLf
19.The logging daemon on recent Linux distributions based on systemd is called:
o klogd
o journald
o rsyslogd
o syslogd
20.What does the acronym FHS stand for among the the standards supported by the
Linux Foundation?
o Filesystem Hierarchy Standard
o File Hierarchy Standard
o Filesystem Hierarchy Structure
21.Which directory is the root of the filesystem?
o /sys
o /root
o /
o /home
o /var
22.The sbin directories are primarily intended to be used by the root user.

True or False?

o True
o False

---------------------------------------------------------13---------------------------------------------------

NDG Linux Essentials 2.0 Chapter 14 Exam Answers


1. Which of the following would be considered a host?
o A printer attached to the network via an IP address
o A network cable
o A CD-ROM
o The computer’s hard drive
2. A service is…
o …like an IP address.
o …a file that contains configuration information.
o …another name for a computer’s hostname.
o …a feature provided by one computer to another.
3. A network packet contains …

(choose two)

o …the IP address of the source machine.


o …a hard drive partition.
o …the name of the router.
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 DHCP
o DNS
o TCP/IP
o SSH
6. Which of the following are valid IPv4 addresses?

(choose two)

o 192.105.10.10.2
o 192.301.25.25
o 10.33.55.77
o 192.105.10.10
7. Which of the following commands will display the IP address on a Linux system?
o ifconfig
o dig
o route
o ipconfig
8. Which of the following commands will display the routing table?
(choose two)

o dig
o netstat -r
o ifconfig
o route
9. Which of the following commands will allow you to log into a remote machine?
o dig
o netstat
o route
o ssh
10.What option to the netstat command has information shown as numbers rather
than names?
o –name
o -r
o -t
o -n
11.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
12.The RSA key fingerprint allows the dig command to connect to remote systems.

True or False?

o True
o False
13.When looking at the primary IPv4 configuration file, if the device was configured to
be a DHCP client, then the BOOTPROTO value would be set to none.

True or False?

o True
o False
14.When issuing the service network restart command, which of the following occurs?
o …brings up all network interfaces, re-reads all related configuration files and then the
networking for the system is restarted.
o …the networking for the system is stopped and then started back up.
o …takes down all network interfaces, re-reads all related configuration files and then the
networking for the system is restarted.
15.Which of the following files contains the IP addresses of the name servers the system
should consult in any attempt to resolve names to IP addresses?
o /etc/nsswitch.conf
o /etc/resolve.conf
o /etc/hosts
o /etc/resolv.conf
16.Which of the following commands can be used to display socket statistics, and
supports all major packet and socket types?
o ss
o ifconfig
o route
o top

------------14-------------------------

NDG Linux Essentials 2.0 Chapter 15 Exam


Answers
Posted on May 9, 2019 by Admin

Last Updated on May 16, 2019 by Admin

NDG Linux Essentials 2.0 Chapter 15 Exam Answers


1. Which files contain user account information?
(choose two)
o /etc/shadow
o /etc/group
o /etc/passwords
o /etc/passwd
2. Which user can view the /etc/shadow file?
o Any member of the password group
o No users
o The root user
o All users
3. Which command will display the UID, GID and groups your current user belongs
to?
o whoami
o Who
o id
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 about
o who
o id
o whoami
6. The sudo command allows regular users to…
o …execute commands as another user.
o …execute any command as root, after providing the root password.
o …run any command as root, after providing the sudo password.
o …run any commands as a system account without logging in.
7. Which of the following commands will display the group(s) a user belongs to?
o all
o id
o whoami
o group
8. Which of the following commands will display the groups that the user bob belongs
to?
o group bob
o id bob
o groups -a
o all bob
9. The /etc/group file follows what structure?
o group:GID:user_list
o groups -a
o user:group
o group_name:password_placehoder:GID:user_list
10.A GID is associated with a group name.

True or False?

o True
o False
11.A user can belong to…
o At least 16 groups
o Only five groups
o Only groups with a GID over 500
o Only one group
12.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
13.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
14.Which of the following commands will display how long the system has been
running since the last boot?

(choose two)

o who
o id
o uptime
o w
15.The /etc/shadow file contains plain-text passwords.

True or False?

o True
o False
16.Which command can be used to view the /etc/passwd file entries?
o uptime
o uppasswd
o getpasswd
o getent
17.All Linux systems allow administrators to log in as root.

True or False?

o True
o False
18.What is the default user for the su command?
o All users
o The root user
o Any member of the password group
o The most recently created user
19.Which command would allow a user to execute commands as root?
o whoami
o about
o sudo
o who
o grep
20.File permissions cannot be edited by the root user.

True or False?

o True
o False
21.Which command is used to display only the user’s primary group?
o who
o id -g
o man
o whoami
o about
22.Traditional UNIX systems allowed users to belong to how many groups?
o 10,000
o 1
o 65,000
o 256
o 16
23.What would an account with the UID 376 typically be used for?
o White hat hackers.
o Temporary employees.
o New users with full privileges.
o System service access.
o Root user access.
24.Usernames cannot be the same as group names.

True or False?

o True
o False
25.To display the group(s) a user belongs to use this command:
o all
o id
o grep
o group
o whoami
26.Which command will display the groups that the root user belongs to?
o all -t
o groups -a
o id root
o all
o group -r
27.A value of 0 in the “minimum” password aging field means the user cannot change
their password.

True or False?

o True
o False
28.The “Epoch” began on January 1, 1970.

True or False?

o True
o False
29.The last command displays reboot records…
o By default
o Never
o Only when issued by the root user
o After restarting the system
o When issued with the -p switch
30.Sudo privileges allow users to execute commands as another user.

True or False?

o True
o False
31.When using the sudo command to execute a command as the root user, the command
prompts for the user’s own password, not that of the root user.

True or False?

o True
o False
32.The first line of this command displays how long the system has been running since
being rebooted.
o su
o getent
o w
o id
o who
33.The /etc/shadow file contains encrypted passwords.

True or False?

o True
o False
34.Which command can be used to view the /var/log/wtmp file entries?
o getent
o uptime
o getpasswd
o uppasswd
o last

-----------------------------------------------------------------------------15-----------------------------------------

NDG Linux Essentials 2.0 Chapter 16 Exam Answers


1. UIDs 1-499 are usually reserved for what kind of users?
o Remote log-in accounts
o Are not used for user accounts, but for group accounts
o System accounts, such as server processes
o Log-in (human) users
2. If a user is deleted, the files and directories that the user owned…
o …will have no user owner.
o …will have no UID owner.
o …will show a UID as the owner, but not user name.
o …are deleted as well.
3. Which of the following options for the useradd command allows root to specify the
UID to be associated with the account?
o -g
o -G
o -u
o -M
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 -g
o -U
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. 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 -ag bob extra
o usermod -aG extra bob
o usermod -a extra bob
7. Which option for the usermod command can be used to specify a user’s group ID
(either primary or secondary)?

(choose two)

o -s
o -g
o -S
o -G
8. 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
9. The groupmod command can be used to change a group name.

True or False?

o True
o False
10.The groupmod command can be used to change a group GID.

True or False?

o True
o False
11.The groupmod command can be used to add users to a group.

True or False?

o True
o False
12.Which of the following commands can be used to modify a group?
o groupmod
o groupadd
o modgroup
o addgroup
13.Which command can be used to determine a user’s most recent log in?
o history
o last
o login
o shell
14.Which of the following files contains encrypted user password information?
o /etc/usr
o /etc/group
o /etc/passwd
o /etc/shadow
15.Which of the following files contains user IDs?
o /etc/group
o /etc/passwd
o /etc/usr
o /etc/shadow
16.Which of the following files does the groupadd command use to determine the new
GID when a GID isn’t specified?
o /etc/usr
o /etc/shadow
o /etc/passwd
o /etc/group
17.Which of the following commands, run as root, will prevent the user bob from
logging in?
o usermod -L bob
o usermod -l bob
o usermod -D bob
o usermod -d bob
18.What directory contains a user’s home directory?
o /user
o /
o /home
o /rootfs
19.GIDs under 500 (or 1000) are usually reserved for what kind of groups?
o System use
o Are not used for groups, but for user accounts
o Administrators
o User private groups (UPG)
20.If a user is deleted, the files and directories that the user owned…
o …are deleted as well.
o …will have no user owner.
o …may be important for others in the organization
o …will have no UID owner.
21.Which of the following options for the useradd command allows you to use a
different primary group then the default?
o -g
o -G
o -U
o -u
22.On a system that uses UPG, the UID must not be the same as the GID..

True or False?

o True
o False
23.The usermod command can be used to unlock a users account with the following
option.
o -s
o -u
o -f
o -U
24.Which of the following options for the useradd command allows you to use a
different login shell than the default?
o -g
o -s
o -u
o -U
25.Which of the following commands will add the group extra to the user jane’s
secondary groups in addition to jane‘s current secondary groups?
o usermod -a extra jane
o usermod -ag jane extra
o usermod -aG extra jane
o usermod -G extra jane
26.Which option for the usermod command can be used to specify a user’s primary
group ID?
o -g
o -S
o -G
o -s
27.For 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
28.The userdel -r command will…
o …will prompt before deleting each file owned by a user.
o …delete the user account, but leave the user’s files by default.
o …automatically delete a user and the user’s home directory and mail spool and their contents.
o …automatically delete a user and all the files owned by that user.
29.The groupmod command can be used to change a group name.

True or False?

o True
o False
30.The groupmod command cannot be used to change a group GID.

True or False?

o True
o Fasle
31.The groupdel command can be used to delete primary groups.
True or False?

o True
o Fasle
32.Which of the following commands can be used to modify a user?
o adduser
o moduser
o useradd
o usermod
33.Which command can be used to determine a user’s most recent log in?
o history
o shell
o login
o last
34.The /etc/passwd file contains encrypted user password information. True or False?

True or False?

o False
o True
35.Which of the following files contains group IDs?
o /etc/passwd
o /etc/usr
o /etc/shadow
o /etc/group
36.Which command allows you to view or change some of the default values used by the
useradd command?
o useradd -D
o useradd -r
o modvalue
o useradd -f
37.Which of the following commands, run as root, will prevent the user jane from
logging in?
o usermod -d jane
o usermod -D jane
o usermod -L jane
o usermod -l jane

------------------------------------------------------------16--------------------------------------------------------

NDG Linux Essentials 2.0 Chapter 17 Exam Answers


1. Which of the following commands set “other” permissions on file to r-x?
o chmod o-r-w file
o chmod o+rx file
o chmod o=rx file
o chmod o=r+x file
2. Which of the following commands sets “other” permissions on file to r-x?
o chmod 775 file
o chmod 776 file
o chmod 777 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 letter
o primary
o symbolic
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 user sysadmin will be able to read a file because they own it.

True or False?

o True
o False
7. The user sysadmin will be able to change the permissions of a file because they own it.

True or False?

o True
o False
8. Octal notation uses the following values for the permissions granted:
o r = 7, w = 5, x = 0
o r = 3, w = 2, x = 1
o r = 4, w = 2, x = 0
o r = 4, w = 2, x = 1
9. Which of the following permissions would allow all users to add, view, and delete
files in a directory?
o 750
o 775
o 666
o 777
10.A user cannot delete a file if they do not own it.
True or False?

o True
o False
11.The “execute” permission on a directory allows you to:

(choose three)

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
o Change to that directory or use it as part of a path
12.The “execute” permission on a file allows you to:
o Move the file to a new directory
o Delete the file
o Run the file as a script
o This permission isn’t meaningful for text files.
13.The chgrp command can be used on a file by:
o A user that belongs to the files current group
o Only the file owner
o The file owner and root
o Only root
14.The chown command can be used to change the user owner on a file by:
o The file owner
o Only root
o The file owner and root
o A user that belongs to the files current group
15.The chmod 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
o The file owner and root
16.The “execute” permission is never set on files by default.

True or False?

o True
o False
17.Which of the following chown commands will change the myFile user ownership to the
user sam and the group ownership to administrators?

(choose two)

o chown sam administrators myFile


o chown sam.administrators myFile
o chown sam:administrators myFile
o chown sam+administrators myFile
18.The chown command permits changing group ownership done by root only.

True or False?
o True
o False
19.The user owner of a file will always have the same or higher permissions as “other”.

True or False?

o True
o False
20.Which of the following commands will list hidden files as well as their ownership?
o ls -la
o ls -l
o ls -a
o ls -z

------------------------------------------------------------------17--------------------------------------

NDG Linux Essentials 2.0 Chapter 18 Exam Answers


1. The /tmp directory is a temporary directory designed as a location where any user
can create a temporary file.

True or False?

o True
o False
2. The “sticky bit” permission…
o …sets the group ownership of any new file created in a directory.
o …prevents others from removing files they don’t own from a common directory.
o …changes the group ownership of existing files in a directory.
o …prevents others from overwriting files they don’t own in common directories.
3. Which of the following commands will set the “sticky bit” on /shared ?
o chmod 2777 /shared
o chmod 1777 /shared
o chmod 6777 /shared
o chmod 4777 /shared
4. The “setuid” permission…
o …prevents the owner of a file from being changed.
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.
5. Which of the following commands will set setuid for /usr/bin/program?
o chmod 4755 /usr/bin/program
o chmod 2755 /usr/bin/program
o None of the above
o chmod 1755 /usr/bin/program
6. The “setgid” permission…

(choose two)

o …prevents the group owner of a file from being changed.


o …allows a command to be run as the group owner of the file.
o …allows files created in a directory to be owned by the group that owns the directory.
o …can only be set on files.
7. Which of the following commands will set setgid on /shared ?
o None of the above
o chmod 2777 /shared
o chmod 1777 /shared
o chmod 4777 /shared
o chmod 4777 /shared
8. Which of the following long listings represents setgid set for /shared ?
o drwxrwsrwx. 12 root group 4096 Oct 21 13:12 /shared
o drwsrwxrwx. 12 root group 4096 Oct 21 13:12 /shared
o drwxrwxrws. 12 root group 4096 Oct 21 13:12 /shared
o drwSrwxrwx. 12 root group 4096 Oct 21 13:12 /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 …is not allowed by the system.
o …does nothing.
o …will set the group owner of all files created in the directory to the group owner of the
directory.
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?
o ln file link
o ln link file
o ln -s file link
o ln -s link file
15.Which of the following commands would create a symbolic link, link to file?
o ln file link
o ln -s link file
o ln link file
o ln -s file link
16.Which of the following ls commands, when executed, will only show information
about the directory itself?

(choose two)

o ls -h
o ld -d
o ls -ld
o ld -a
17.Which of the following directories are designed as locations where any user can
create a temporary file?

(choose two)

o /sbin
o /lost+found
o /tmp
o /home
o /var/tmp

-----------------------------------------------------------------18-------------------------------------------------

You might also like