2. Exercise for Exploring Linux Command-Line Tools, Linux Essentials 010-150 Part 2, Chapter 14, Linux Ch 7, 1.12 Regular Expressions, 211 Final, Quiz 2 (Linux), LINUX TEST 3, Chapter 10: Editing Files (Review Questions), Chapter 9, Liinux Study, Hom...

Ace your homework & exams now with Quizwiz!

Which of the following terms best characterizes the Linux kernel? A. Commercial B. Open source C. Freeware D. Shareware E. Proprietary

B. Open source

What is the #1 Linux System Monitoring Tools that every system administrator should know, as described by the nixCraft website? A. The "uptime" program B. The "top" program C. The "free" program D. The "GSysguard" program

B. The "top" program

What is the output command that allows control characters like \t, \n, \b, and \L to be displayed from a Perl script? A. do B. print C. echo D. write

B. print

What command can you use to retrieve user input into a variable in a Bash script? A. inline B. read C. get D. getline E. input

B. read

Which configuration files hold files that describes virtual hosts? A. /etc/dns/hosts B. sites-available/ C. etc/dns/resolve D. /etc/inet/confn

B. sites-available/

Which of the following is a typical directory location for program documentation? A. /usr/share/doc/ B. /bin/ C. /usr/local/bin/ D. /usr/local/doc/ E. /sbin/

C. /usr/local/bin/

One and only of the available physical partitions is marked as an extended partition, which then functions as a container for up to _____ additional logical partitions A. 10 B. 16 C. 15 D. 9 E. 32

C. 15

Which of the following is not a popular SMTP server for Linux? A. Postfix B. Sendmail C. Fetchmail D. Exim E. qmail

C. Fetchmail

A popular Linux GUI help program that assists users with info pages is _____. A. The GIMP B. Blender C. GNU Emacs D. Evolution E. less

C. GNU Emacs

Which of the following is not an Apache item? A. document root B. Alias C. chron D. Directive

C. chron

What types of information does the id command provide? (Select all that apply.) Your UID number Your default group Your current group All your group memberships Your username

- Youe UID number -Your current group - All your group memberships - Your username

What is the purpose of the system account with a UID of 0?

A The UID 0 is reserved for the root user.

You want to create a new system account for a server program you're installing. What option can you pass to useradd when creating the account to ensure that it's created as a system account? A. -system B. -nouser C. -sysaccount D. -shared E. -nohome

A. -system

_____ files are those the control how the computer operates and includes things like system startup scripts, program support files, and system log files. A. System B. Daemon C. Archived D. Zipped E. Program

A. System

128

ASCII supports _______ unique characters (not including control characters).

A symbol found in the root shell prompt by default is __.

Answer: #

To refer to the file afile.txt in the directory one level above the current one, you would type ___afile.txt.

Answer: ../

The file that associates usernames with UID numbers in Linux is ___________. (Provide the complete path to the file.)

Answer: /etc/passwd

A file has a symbolic mode of -rw-r-----. The file's octal mode is _______.

Answer: 640

You've created a script, sensitive, and you want to be sure that no other ordinary user of the computer can read, write, or execute it, but you must be able to read, write, and execute it. To do so, you type chmod ______ sensitive. (Specify the octal mode.)

Answer: 700

The character that separates fields on each line of /etc/passwd is ___.

Answer: :

A(n) _________ environment means that a person cannot deny actions, and the sudo command helps establish this environment.

Answer: nonrepudiation

A _______ is a GUI program in which text-mode programs (including shells) run

Answer: terminal

To learn who is currently logged into the computer and what programs they're currently running, you can type _____.

Answer: w

an option of chown that changes ownership of all subdirectories

-R or recursive

Which options to FIND can you use to locate files owned by a particular user?

-UID -User

You want to see only the names of all the subdirectories of the current directory whose names begin with the letter s. To do so, you can type ls ___ s*. (Include no options other than those required to do as the question specifies.)

-d

Which optional parameter would you use with the Linux sort command to ignore case sensitivity?

-f

to delete an account without logging it off, type userdel ? "name"

-f

What is the filename extension for the bzip2 compression program?

.bz2

What is the filename extension for the bzip2 compression program?

.bz2 .2bz .zb2 Next Mark For Review

Which of the following extensions would you use at the end of the script name?

.sh

Using the image below, which keyboard character best represents the top of the Linux directory structure?

/

Which Linux directory usually holds the system configuration files?

/etc

Which of the following files defines Linux groups? /etc/groups /etc/grp /etc/gids /etc/group

/etc/group

The file that associates usernames with UID numbers in Linux is ___________. (Provide the complete path to the file.)

/etc/passwd

Which of the following files would you search in order to obtain information about a user in a Linux OS?

/etc/passwd

Which file now stores users passwords in the Linux OS?

/etc/passwd /etc/groups /etc/shadow Next Mark For Review

Which of the following files would you search in order to obtain information about a user in a Linux OS?

/etc/passwd B. /etc/shadow

what file would you find nameserver 8.8.8.8 a. /etc/resolv.conf b. /etc/hosts Incorrect c. /etc/fstab d. /etc/group e. /etc/services

/etc/resolv.conol

Which file now stores users passwords in the Linux OS?

/etc/shadow

To append a program's standard error to an existing file without deleting its contents, you should use the ____ redirection operator.

2>>

vi editor runs in how many modes?

3

The lowest UID number used for user accounts on Linux systems is typically

500 or 1000

A file has a symbolic mode of -rw-r-----. The file's octal mode is _______.

640

The character that separates fields on each line of /etc/passwd is ___.

:

character that separates each line of /etc/passwd is

:

You're working in Vi and, after having saved your current file, you want to load a new one. You can do so by typing ____ newfile.txt from command mode.

:e

how to load a new file after saving one in vi, you type ___ newfile.text from command mode

:e

When assigning a value to a variable in a Bash script, you separate the variable from its value with the ____ character.

=

Which of the following redirection operators appends a program's standard output to an existing file, without overwriting that file's original contents?

>>

Which of the following redirection operators appends a program's standard output to an existing file, without overwriting that file's original contents? | 2> &> > >>

>>

What is another name for a bash shell script that you might see?

?

Which command would you use to display prompts for a user in a shell script?

?

Which wildcard character can be matched for any one symbol in a filename?

?

_____ are collections of programming functions that can be useful to many programs.

?

What symbol do you place after a command to run the program in the background?

A An ampersand (&), placed after a command typed in Bash, causes the command to run in the background, so option A is correct. The remaining options do not accomplish this task, although option C redirects standard output and option D creates a pipe to the following command on the same line. Option B is completely meaningless, as is option E in this context, although a hash mark (#) does serve as a comment character in Bash scripts.

Which of the following options to chown changes the ownership of all the subdirectories of any specified directories, rather than just the files or directories that are explicitly passed to it?

A The -R or --recursive option does as the question specifies, so option A is correct. The --tree, -all, and -t options are all fictitious, so options B, D, and E are all incorrect. Option C is almost correct, but the correct option includes two dashes, not one—that is, it's --recursive, not -recursive.

You want to run the command cat /etc/shadow as root, but your logged in as an ordinary user. Which of the following commands will do the job, assuming that the system is configured to give you root access via the appropriate command?

A The command sudo cat /etc/shadow will give the ordinary user access for the command to run as root.

Which of the following programs produces a summary of the memory status of your computer, including the total memory available, the amount used, and the amount that's unused?

A The free command produces the information specified, so option A is correct. Options B, C, and D are all fictitious program names, at least on Linux. The Linux df command (option E) produces a summary of disk space available and used, not memory, so it's incorrect.

Which of the following options to chown changes the ownership of all the subdirectories of any specified directories, rather than just the files or directories that are explicitly passed to it? A. -R B. --tree C. -recursive D. -all E. -t

A ( recursive also correct but needs 2 dashes)

Which single keyboard character represents any single character except in a new line in a regular expression in Linux?

A . D. #

Which type of file is nano LEAST likely to be useful for examining or editing?

A /var/log/messages log file An HTML Web page file A LibreOffice word processing document An /etc/X11/xorg.conf configuration file Next Mark For Review

Which type of file is nano LEAST likely to be useful for examining or editing?

A LibreOffice word processing document

Repetition Operators

A full or partial regular expression may be followed by a special symbol to denote how many times a matching item must exist. Specifically, an asterisk (*) denotes zero or more occurrences, a plus sign (+) matches one or more occurrences, and a question mark (?) specifies zero or one match. The asterisk is often combined with the dot (as in .*) to specify a match with any substring. For instance, A.*Lincoln matches any string that contains A and Lincoln, in that order—Abe Lincoln and Abraham Lincoln are just two possible matches.

If you were to type the following in a Linux command line terminal, what type of results might you receive?

A list of the users on that Linux computer.

If you were to type the following in a Linux command line terminal, what type of results might you receive? cat /etc/passwd

A list of the users on that Linux computer.

You type touch afile.txt in a directory that contains no files. What will be the effect?

A new empty file called afile.txt will be created in the current directory.

Range Expressions

A range expression is a variant on a bracket expression. Instead of listing every character that matches, range expressions list the start and end points separated by a dash (-), as in a[2-4]z. This regular expression matches a2z, a3z, and a4z.

What type of information will you find in /etc/passwd for ordinary user accounts? (Select all that apply.)

A user ID (UID) number The path to the account's default text-mode shell The path to the account's home directory

What type of information will you find in /etc/passwd for ordinary user accounts? (more than one answer) A user ID (UID) number A complete listing of every group to which the user belongs The path to the account's home directory The path to the account's default GUI desktop environment The path to the account's default text-mode shell

A user ID (UID) number The path to the accounts home directory The path to the account's default text-mode shell

Which of the following two office suites are most closely related to one another?

A, E LibreOffice is derived from OpenOffice.org, so options A and E are correct. GNOME Office and KOffice are independently-created office suites for Linux, while Microsoft Office is a commercial office suite for Windows and Mac OS X. Thus, options B, C, and D are all independent of each other and of LibreOffice and OpenOffice.org.

What symbol do you place after a command to run the program in the background? A. & B. + C. > D. | E. #

A. &

Which of the following options to chown changes the ownership of all the subdirectories of any specified directories, rather than just the files or directories that are explicitly passed to it? A. -R B. -tree C. -recursive D. -all E. -t

A. -R

Match the grep options with the correct meanings A. -i 1. whole word B. -w 2. resulted phrase only C. -v 3. ignore case D. -o 4 reverse results

A. -i ------ 3. ignore case B. -w ---- 1. whole word C. -v ----- 2. reverse results D. -o ----- 4. resulted phrase only

What option character is used to create a user's home directory with the useradd command? A. -m B. -s C. -G D. -h

A. -m

What is the option used with "dhclient" that is used to release an IP address? A. -r B. --rel C. -d D. -rt

A. -r

User specific "cron" files are in what directory file? A. /var/spool/cron/tabs/ B. /etc/crontab C. /etc/cron.* D. /var/etc/cron/spool

A. /var/spool/cron/tabs/

Which of the following productivity software packages used to be owned by Oracle? A. Apache OpenOffice B. Calligra C. GNOME Office D. LibreOffice E. Microsoft Office

A. Apache OpenOffice

What are two forms of regular expressions used in Linux? A.Basic B.Hexadecimal C.Extended D.Alphanumeric

A. Basic C. Extended

Which of the following are risks you take when you browse the web as an ordinary user on a properly configured Linux System? (Select all that apply.) A. Data transferred to or from a web site can be intercepted, possibly exposing sensitive data to theft B. A web site with malicious dynamic content could steal your personal data files C. The server computer, if compromised, could create a new account on your computer, thus compromising it D. A Malicious web site can charge you money to access their services E. A virus intended for Windows, when delivered via a web site to a Linux system, will damage your video card

A. Data transferred to or from a web site can be intercepted, possibly exposing sensitive data to theft & B. A web site with malicious dynamic content could steal your personal data files

What configuration file holds variables that modify the environment Apache Runs in? A. Envvars B. hvars C. vars-enabled D. http-vars.conf

A. Envvars

Core Unix tools include which of the following? (Select all that apply.) A. GNU tool set B. Startup scripts C. X Windows System D. Aqua user interface E. Linux Kernel

A. GNU tool set & C. X Windows System

How would you remove two lines of text from a file using the Vi text editor? A.In command mode, position the cursor on the first line and type 2dd. B.In command mode, position the cursor on the last line and type 2yy. C.In insert mode, position the cursor at the start of the first line, hold down the Shift key while pressing the Down arrow key twice, and press the Delete key on the keyboard. D.In insert mode, position the cursor at the start of the first line and press Ctrl+K twice. E.Select the text with the mouse and then select File » Delete from the menu.

A. In command mode, position the cursor on the first line and type 2dd

Which of the following two office suites are most closely related to one another? (choose two) A. LibreOffice B. GNOME Office C. Calligra D. Microsoft Office E. Apache OpenOffice

A. LibreOffice & E. Apache OpenOffice

Which of the following are true statements about SQL tables? (Select two.) A. Multiple tables may exist in a single SQL database. B. Tables may be combined for cross-table searches using the DROP command. C. Tables consist of rows, each of which holds attributes, and columns, each of which defines a specific database item. D. Careful table design can reduce the amount of data entry and database storage size. E. Tables are stored on disk using a lossy compression algorithm.

A. Multiple tables may exist in a single SQL database. D. Careful table design can reduce the amount of data entry and database storage size.

What type of information can netstat provide? (Chose all that apply.) A. Network Interface Information. B. Routing table data. C. A list of open ports D. Round-trip network travel time. E. The identities of broken routers.

A. Network Interface Information B. Routing table data & C. A list of open ports

Which of the following distributions use RPM's for package management? (Select all that apply.) A. OpenSUSE B. Debian C. CentOS D. Gentoo E. Ubuntu

A. OpenSUSE & C. CentOS

What is the Red Hat Package manager that is used mainly in Red Hat, openSUSE, Fedora, and other Red Hat derivatives? A. RPM B. PMR C. RHPM D. RHM E. MPR

A. RPM

Which of the following are the two major Linux package management systems? A. RPM B. BASH C. DPKG D. TAR

A. RPM C. DPKG

After using a text editor to create a shell script, what step should you take before trying to use the script by typing its name? A) Set one or more executable bits using chmod. B) Copy the script to the /usr/bin/scripts directory. C) Compile the script by typing bash scriptname, where scriptname is the script's name. D) Run a virus checker on the script to be sure it contains no viruses. E) Run a spell checker on the script to ensure it contains no bugs.

A. Scripts, like binary programs, normally have at least one executable bit set, although they can be run in certain ways without this feature, so option A is correct. There is no standard /usr/bin/scripts directory, and scripts can reside in any directory, so option B is incorrect. Scripts are interpreted programs, which means that they don't need to be compiled. Typing bash scriptname will run the script; option C is incorrect. Viruses are extremely rare in Linux, and because you just created the script, the only ways in which it could possibly contain a virus would be if your system was already infected or if you wrote it as a virus. Thus option D is incorrect. Most spell checkers are intended for English or other human languages, so they lack valid Bash commands such as esac. Furthermore, even if every keyword is spelled correctly, the script could contain bugs. Thus option E is incorrect.

Which of the following actions does the find command perform? A. Searching a file in a directory B. Changing text in a file C. Listing all hidden files and directories D. Matching a pattern in a file

A. Searching a file in a directory

What are the two types of FHS files found in the Filesystem Hierarchy Standard? A.Standard B.Variable C.Synchronous D.Asynchronous

A. Standard B. Variable

Which key would you press if you wanted to do a command completion of a longer filename or command? A. Tab B. Spacebar C. Enter D. Shift E. Ctrl

A. Tab

Which of the following pieces of information on user accounts is not normally stored in the /etc/passwd file on the modern Linux distributions? A. The account's default shell B. The account's default GID number C. The account's UID number D. The account's username E. The account's Password

A. The account's default shell

Which of the following is not one of the Open Source essential freedoms? A. To charge for revised software B. To redistribute copies C. To run a program for any purpose D. To distribute copies of modified versions E. To study how a program works

A. To charge for revised software

True or false: The find command enables you to locate files based on their sizes. A. True B. False

A. True

True or false: You can set a directory's time stamps with the touch command. A True B.False

A. True

What types of information does the id command provide? (Choose all that apply.) A. Your UID Number B. Your terminal identifier C. Your current group D. All your group memberships E. Your username

A. Your UID Number C. Your current group D. All your group memberships & E. Your username

To have a script send an email automatically, which command would you use to do this? A. mail B. sed C .awk D. email

A. mail

Which of the following commands supports both gzip and bzip2 compression? A. tar B. archive C. zip D. zcat

A. tar

If you were a Linux system's administrator and wanted to see who is currently logged into the computer and what programs they are currently running, you can type the ____ command. A. w B. whoami C. uid D. u

A. w

If you were a Linux system's administrator and wanted to see who is currently logged into the computer and what programs they are currently running, you can type the ____ command.

A. w C. uid D. u

Which of the following is not a comparison operator that can be used in a bash script? A. x=y B. x!=y C. x -lt y D. x > y E. x -eq y

A. x=y

Which of the following is a user specific login shell? A. ~/.profile B. /etc/profile C. /etc/usr/profile D. ~/.bashrc

A. ~/.profile

If you were to type the following in a Linux command line terminal, what type of results might you receive?

An encrypted list of all users passwords for that Linux computer. A list of all user ID numbers for that Linux computer. A list of the users on that Linux computer. Next Mark For Review

Using the image below, what does the x character represent? " roman x 1025:100::/home/roman:/bin/bash

An encrypted password stored in the /etc/shadow file.

Using the image below, what does the x character represent?

An encrypted password stored in the /etc/shadow file. (Your Answer)

Which of the following programming languages is most often implemented as a compiled language?

D Of these languages, only C++ is commonly implemented as a compiled language, so option D is correct. The remaining options are all commonly implemented as interpreted languages.

You type touch afile.txt in a directory that contains no files. What will be the effect?

D The touch command updates a file's time stamps or creates a new empty file if one doesn't already exist. Since the latter case is described by the question, a new file will be created, as described in option D. Since touch doesn't copy files, option A is incorrect. Option B would be correct if there were an explicit reference to your home directory in the file specification, but the command as stated works on a file in the current directory, so option B is incorrect. Because the command will create a new file, options C and E are both incorrect.

Mary finds that she can delete George's files in /tmp. What might this imply? A. This is normal; all users should be able to delete files from /tmp. B. The SUID bit is present on /tmp; it should be removed. C. World write permissions are set on /tmp; they should be removed. D. The sticky bit is missing from /tmp; it should be set. E. The /tmp partition is mounted read-only; it should be mounted read/write.

D - sticky bit missing

Which environment variable stores the format for the command prompt? A Prompt B PSI C PAGER D PS1 E None of these variable store the format for the command prompt.

D PS1

Which of these pipe examples will look for subdirectories in which the first letter of each file is "d"? A. ls-l | *d B. ls-l | grep &d C. ls-l | wc -d D. ls-l | grep ^d E. ls-l | match d

D. ls-l |grep ^d

What is the platform that powers Ubuntu? A. Graphical B. OST C. Basic D. Form Users E. Unity

E. Unity

Which Linux command provides the information by displaying the names of files in a directory? A. mv B. cp C. ln D. mkdir E. ls

E. ls

Which keystrokes invoke the pico or nano search function? (choose two)

F6 Ctrl + W

True or false: A user types myscript laser.txt to run a script called myscript. Within myscript, the $0 variable holds the value laser.txt .

False

True or false: GUI text editors for ASCII are superior to text-mode ASCII text editors because the GUI editors support underlining, italics, and multiple fonts.

False

True or false: You can configure your power supply by accessing the /dev/power device file.

False The power supply can't be directly controlled through Linux device files; it either delivers power in a steady manner or it doesn't, without software control.

True or false: The -n option to traceroute causes it to display hostnames rather than IP addresses.

False The statement has it backwards; -n causes traceroute to display IP addresses rather than its default of hostnames.

What is the effect of the following short script, cp1, if it's called as cp1 big.c.big.cc? #!/bin/bash cp $2 $1

It copies the contents of big.cc to big.c, eliminating the old big.c.

What is the effect of the following short script, cp1, if it's called as cp1 big.c.big.cc? #!/bin/bash cp $2 $1

It copies the contents of big.cc to big.c, eliminating the old big.c.

True or False: Functions in bash do not return values, by default

True

You can use grep to search for strings in binary files. True False

True

True or false: You can use grep to search for strings in binary files.

True Although grep is more commonly employed to search text files, it can search for strings in binary files.

True or false: The lowest UID number used for user accounts on Linux systems varies from one installation to another.

True Most distributions today use a minimum UID number of 1000; however, some use 500, and administrators can change this value if they so desire.

True or false: A carat (^) represents the start of a line in regular expressions.

True The carat (^) represents the start of a line, as the question specifies.

Which of the following Linux command line tool is used to extract a compressed file?

bzip2 gunzip Next Mark For Review

You want to run an interactive script, gabby, which produces a lot of output in response to the user's inputs. To facilitate future study of this script, you want to copy its output to a file. How might you do this?

gabby | tee gabby-out.txt

Which command would you type if you wanted to display your username from a Linux command line terminal shell?

whoami

Which two keyboard characters can denote an account with no password?

! *

Which character begins a comment in many common configuration files, such as /etc/fstab? ! # / ( "

#

What is the directive that is required on the first line of a Perl Script?

#! usr/bin/perl

The string _______, located at the start of the file, identifies a script as a Bash script.

#!/bin/bash

What is the directive that is placed on the first line of every new bash script?

#!/bin/bash

Which of the following entries is maintained at the first line of the script?

#!/bin/sh

Which of the following entries would you use on the first line of a script you are creating in Linux?

#!/bin/sh

You've written a simple shell script that does nothing but launch programs. In order to ensure that the script works with most user shells, what should its first line read?

#!/bin/sh

You've written a simple shell script that does nothing but launch programs. In order to ensure that the script works with most user shells, what should its first line read?

#!/bin/sh (Your Answer)

You're writing a script that should accept two arguments, a username and a year, specified in that order on the command line. What variable would you use to access the year?

$2

You're writing a script that should accept two arguments, a username and a year, specified in that order on the command line. What variable would you use to access the year? $1 $year $annum $2 $B

$2

The symbols which make up the Bash logical and operator is ____.

&&

Complete the following command to redirect both standard output and a standard error from the bigprog program to the file out.txt. $_____ bigprog out.txt.

&>

Complete the following command to redirect both standard output and standard error from the bigprog program to the file out.txt:

&>

Complete the following command to redirect both standard output and standard error from the bigprog program to the file out.txt: $ bigprog _____ out.txt

&>

Which two keyboard characters can denote an account with no password?

*, !

how to create a group with groupadd that provides group with a GID number of 1027

--gid 1027

The _________ option to tar causes it to back up only the specified low-level filesystem; if another filesystem is mounted within the directory you say to back up, those files will be ignored.

--one-file-system

Which option to zip can you use to encode symbolic links as such rather than including the linked-to file? -i -l -s --links --symlinks

--symlinks

how to create a new system account for a server program you install that you can pass to useradd?

--system

What keystroke deletes a line of text when using nano? Ctrl+C Ctrl+X Ctrl+Y Ctrl+K Ctrl+D

Ctrl+K

Three keystrokes that can initiate a search-and-replace operation in nano are F14, __________, and __________.

Ctrl+\ Esc+R

Which of the following is an inappropriate choice for a filesystem to hold the majority of a Linux installation?

D The Hierarchical File System (HFS) was used by Mac OS prior to Mac OS X. It doesn't support features required by Linux in its main filesystem, so option D is the correct answer. JFS, ext4fs, ReiserFS, and XFS are all Linux-native filesystems (either developed explicitly for Linux or converted from other Unix-like OSes), so options A, B, C, and E are all incorrect.

Which of the following is not a Linux command shell program?

D The login program handles text-mode logins, but it isn't a shell program, so option D is correct. The remaining options are all Linux shell programs, so options A, B, C, and E are all incorrect. (Option E, bash, is the default shell for most distributions.)

In the Perl syntax, what is the symbol that is used to precede a variable name when the variable is assigned? A. % B. () C. # D. $

D. $

When scripting in Perl, what command is used to indicate the index number of the last array element? A. @ARGV B. $ARGV+1 C. $#ARGV D. !#ARVG

D. $#ARGV

You're writing a script that should accept two arguments, a username and a year, specified in that order on the command line. What variable would you use to access the year? A. $1 B. $year C. $annum D. $2 E. $B

D. $2

Where do most log files reside on a Linux computer? A. /home/logging B. /usr/log C. /etc/logging D. /var/log E. /log/usr

D. /var/log

What is the default number unit of time which the sleep instruction suspends the calling process? A. 100 microseconds B. 1 second C. 10 microseconds D. 10 seconds

D. 10 seconds

Which of the following is the port number for the DNS protocol? A. 22 B. 23 C. 25 D. 53 E. 67

D. 53

What key stroke is used as a separator for multiple commands on one line? A. \ B. ! C. % D. ; E. +

D. ;

Which of the following redirection operators appends a program's standard output to an existing file, without overwriting that file's original contents? A. 2> B. &> C. > D. >> E. |

D. >>

Which wildcard character can be matched for any one symbol in a filename? A. * B. / C. + D. ?

D. ?

If you were to type the following in a Linux command line terminal, what type of results might you receive?cat /etc/passwd A.An encrypted list of all users passwords for that Linux computer. B.An un-encrypted list of all user passwords for that Linux computer. C.A list of all user ID numbers for that Linux computer. D. A list of the users on that Linux computer.

D. A list of the users on that Linux computer.

You type touch afile.txt in a directory that contains no files. What will be the effect? A. The afile.txt file from your home directory will be copied to the current directory. B. The afile.txt file in your home directory will have its time stamp updated. C. Nothing, the command will return without doing anything. D. A new empty file called afile.txt will be created in the current directory. E. The touch command will return a file not found error.

D. A new empty file called afile.txt will be created in the current directory.

Apache Software Foundation (ASF) is made up of what technology? A. Tomcat B. HTTP Server C. Subverdion D. All of the above

D. All of the above

Making sure that major hardware devices such as the CPU, memory disk, extension card, I/O port/connector, monitor, and printer function is normally a goal for the what? A. Hardware management B. File system C. Core service management D. All of the above

D. All of the above

What task is the Linux administrator most likely to perform? A. Troubleshoot common device problems B. Install/upgrade hardware device drives C. Upgrade device drivers D. All of the above

D. All of the above

Which Linux distribution are you most likely to find in use on a cell phone? A. Debian B. Fedora C. CentOS D. Android E. Slackware

D. Android

Which of the following programming languages is most often implemented as a compiled language? A. Python B. Bash Shell C. Perl D. C++ E. PHP

D. C++

What keystroke deletes a line of text when using nano? A. Ctrl+C B. Ctrl+X C. Ctrl+Y D. Ctrl+K E. Ctrl+D

D. Ctrl+K

Your Internet connection has gone down for several hours. What is true of email sent by your users to off-site recipients via a properly configured local SMTP server? A. The SMTP server will refuse to accept email from local clients during the outage. B. Email will be neither delayed nor lost. C. All email sent during the outage will be lost. D. Email will be delayed by a few hours but not lost. E. Recipients will have to retrieve the mail via POP or IMAP

D. Email will be delayed by a few hours but not lost.

What _____ was created to give a standardization to the Linux filesystem structure. A. NTFS B. ReFS C. ext4 D. FHS E. There is no standardization for Linux in filesystem structure.

D. FHS

Which file hierarchy structure was created to give a standardization to the Linux filesystem structure? A. SMB B. SMS C. NTFS D. FHS

D. FHS

If you run the "ls -l" command what will you see in the group field? A. The GID B. An xgroup designator C. Group ID D. Group name

D. Group name

Which of the following is an inappropriate choice for a filesystem to hold the majority of a Linux installation? A. JFS B. ext4fs C. ReiserFS D. HFS E. XFS

D. HFS

Which of the following is not a component of the X Window System (X11)? A. X clients (GUI Apps) B. Desktop Environment C. Display Manager D. Linux kernel E. Window Manager

D. Linux Kernel

Which following legal area governs general ideas, independent of their specific implementation? A. Copyright. B. Maritime. C. Trademark. D. Patent. E. Ex post facto

D. Patent.

Which one of the following is not a process status? A. Suspended B. Stopped C. Sleeping D. Random

D. Random

Mary finds that she can delete George's file in /tmp. What might this imply? A. This is normal; all users should be able to delete files from /tmp B. The SUID bit is present on /tmp; it should be removed C. World write permissions are set on /tmp; they should be removed D. The sticky bit is missing from /tmp; it should be set E the /tmp partition is mounted read-only; it should be mounted read/write

D. The sticky bit is missing from /tmp; it should be set

An OS developed in 1969, and on which Linux is Largely modeled, is _____. A. Windows B. MS-DOS C. Apple Mac OS X D. Unix E. Android

D. Unix

APT is a ________ tool that works with core libraries A. User B. Core C. Front end D. Wrapper E. Console

D. Wrapper

What command is used to open a Linux file in order to view it's contents? A. opal B. ls C. more D. cat E. open

D. cat

What Linux command allows you to move from one directory to another within the file system tree structure? A. ch dir B. ch C. C -dir D. cd E. cdc

D. cd

What command/sequence is used to stop pinging? A. del key B. ctrl +s C. ctrl+alt+space D. ctrl+c

D. ctrl+c

What program can you use to manually bring up a network interface in Linux? A. iwlist B. route C. telnet D. ifconfig E. traceroute

D. ifconfig

Which basic command will create a symbolic link (shortcut)to a file? A. cp B. touch C. echo D. ln E. cat

D. ln

Which of the following commands is equivalent to typing apropos (keyword)? A. find -l (keyword) B. less (keyword) C. whatis (keyword) D. man -k (keyword) E. grep -r (keyword)

D. man -k (keyword)

What is the command that will give you an explanation of the ls command and also show options that are available to use with it? A. ls ref B. ls -re C. ls mw D. man ls E. ls -e

D. man ls

Which of the following is a GNU partition editor that is used to manage disk, partitions, and the file system? A. partition helper B. grep C. emak D. parted E. free parted

D. parted

What is a LAMP application that is specifically written for administering MySQL servers? A. PhpServerHost B. Apache2 C. CGI D. phpMyAdmin

D. phpMyAdmin

What command would you use to find out the absolute pathname of your home directory? A. hd -h B. xfce C. path D. pwd E. abs

D. pws

Which option saves your changes when applied with the fdisk command? A. d B. q C. a D. w E. x

D. w

What is the rerouting character/s that is used to append a file rather than to overwrite it? A. > B. << C. 2> D. >> E. <

D.>>

What translates between IP addresses and hostnames?

DNS

Which of the following is NOT considered a Debian based Linux distribution?

Debian OpenSUSE Next Mark For Rev

Which of the following pieces of information on user accounts is not normally stored in the /etc/passwd file on modern Linux distributions?

E Although /etc/passwd includes a field for the password, that field normally contains an x value, meaning that the encrypted password is stored in /etc/shadow. Thus, option E is correct. The accounts default shell, default GID number, UID number, and username all appear in /etc/passwd, so options A, B, C, and D are all incorrect.

Which of the following redirection operators appends a program's standard output to an existing file, without overwriting that file's original contents?

E The >> operator appends standard output to a file, so option E is correct. The vertical bar (|) is the pipe character; it ties one program's standard output to another's standard input. The 2> operator redirects standard error, not standard output; and it overwrites the target file. The &> operator redirects both standard output and standard error, and it overwrites the target file. The > operator redirects standard output, but it overwrites the target file.

Which of the following commands provides a low-level way to install software on a Debian system?

E The dpkg program is the low-level interface to the Debian package system; you can use it to install, uninstall, and otherwise manage packages. Thus, option E is correct. Its equivalent on RPM-based systems is rpm, so option A is incorrect. Options B, C, and D are incorrect because they're all higher-level interfaces to RPM-based systems.

Where does the kernel store its ring buffer logs?

E The kernel ring buffer is held in memory, as option E specifies. Options A, B, C, and D all specify disk directories, which aren't memory locations, and so are all incorrect. (Some distributions place a copy of the ring buffer from late in the boot process in /var/log, but this is just a "snapshot" of the ring buffer at that moment in time, not whatever's current at a later time.)

Which of the following commands displays the name of the directory in which you're working?

E The pwd command does as the question specifies, so option E is correct. The wc command counts lines, words, and characters in a text file, so option A is incorrect. The cat command concatenates multiple files, or displays a file on the screen, so option B is incorrect. The echo command displays whatever text you give it, or the contents of a variable you give it, so option C is incorrect. The cd command changes the current working directory, but does not display its name, so option D is incorrect.

When should you use the root account?

E The root account is extremely powerful, and therefore extremely dangerous. Thus, you should use it only when you need that power to perform administrative tasks, as option E specifies. You'll get little or no extra speed from the root account, so using it as option A specifies will gain you nothing but expose your system to added risk, making option A incorrect. Even if you're the sole user of the computer, using root unnecessarily can be dangerous; and if you're the system administrator, you'll have to use the root account even on a multi-user system. Thus, option B is incorrect. Although root power is sometimes necessary for diagnostics, this isn't always the case, so option C is incorrect. Running untrusted programs is always risky, and running them as root is doubly risky, so option D is incorrect.

What option can you pass to groupadd to have it create a group with a GID number of 1027?

E You can use the --gid (or -g) option to groupadd to specify the GID number for a new group, so option E is correct. Options A, B, C, and D all present fictitious options to groupadd.

Which option to zip can you use to encode symbolic links as such rather than including the linked-to file?

E --symlinks option is fictitious, so option D is incorrect.--links option enables creation of a multi-file archive, so option C is incorrect. The -s to translate Unix-style end-of-line characters into DOS/Windows-style end-of-line characters, so option B is incorrect. The zip option causes -l option tells zip to include only the specified files, so option A is incorrect. The -i option does as the question specifies, so option E is correct. The --symlinksThe

Where are the commands iterated by the loop located within the loop? A Within the then statement section B Between the double semicolons(;;) C Within the case and esac constructs D Within the test statement E Between do and done constructs

E Between do and done constructs

What character/s are used to indicate the number arguments in bash script? A. % B. #2 C. # D. $0 E. $#

E. $#

Linux directories are organized in a heirarchy tree structure that starts from the root directory represented by what? A. \ B. ; C. .. D. . E. /

E. /

How many man page sections are there total? A. 4 B. 5 C. 6 D. 8 E. 9

E. 9

Which of the following is NOT a way companies can legally make money using GPLed software? A. By offering to add features to the GPLed software for a price. B. By selling a mix of GPLed software and proprietary Software. C. By selling technical support services associated with the GPLed software. D. By releasing GPLed software to make use of hardware that the company sells. E. By incorporating GPLed software into a proprietary program that the company sells.

E. By incorporating GPLed software into a proprietary program that the company sells.

Which of the following is not a Linux text editor? A. VIM B. PICO C. EMACS D. Nano E. LEDIT

E. LEDIT

Which of the following makes a good password? A. The word Password. B. Your username. C. The name of a character from your favorite book. D. Your telephone number. E. None of the above.

E. None of the above.

Which common man page section would provide pointers to related information in the man system? A. Files B. History C. Author D. Synopsis E. See Also

E. See Also

What is the purpose of the EDITOR environment variable? A. Set to Y (the default), the shell environment permits editing of commands; set to N, such editing is disallowed. B. It specifies the filename of the text editor that bash uses by default while you're entering commands at its prompt. C. If you type edit filename at a command prompt, the program specified by EDITOR will be launched. D. Set to GUI, programs call a GUI editor; set to TEXT, programs call a text-based editor. E. Some programs refer to EDITOR to determine what external editor to launch when they need to launch one.

E. Some programs refer to EDITOR to determine what external editor to launch when they need to launch one.

Which key/key sequence is not used on command line editing? A. backspace B. up arroe key C. ctrl +a D. ctrl +e E. alt +m

E. alt + m

What command is used check storage or free space on a disk? A. disk -f B. dskfree C. grep -pr D. csplit E. df

E. df

What option can you pass to groupadd to have it create a group with GID number 1027 A. -groupnum 1027 B. -gnum 1027 C. -gidnum 1027 D. -group 1027 E. -gid 1027

E. gid 1027

What is the CLI command that lists the contents of your current working directory? A. lc B. list C. Ls D. List E. ls

E. ls

Which of the following commands displays the name of the directory in which you're working? A. wc B. cat C. echo D. cd E. pwd

E. pwd

What is the command used to record a series of Linux commands to be used later? A. rec B. mc C. recording D. more E. script

E. script

Which command would create a zip file containing the files holiday.tif and desc.txt and compress it as much as possible? A. zip -1 trip.zip holiday.tif desc.txt B. zip -1 hoilday.tif desc.txt trip.zip C. zip -c holiday.tif desc.txt trip.zip D. zip -9 holiday.tif desc.txt trip.zip E. zip -9 trip.zip holiday.tif desc.txt

E. zip -9 trip.zip holiday.tif desc.txt

The home directory is referred to by what character? A. + B. | C. . D. / E. ~

E. ~

What file might a user modify to alter his or her own bash environment? A. ~/.startup B. /etc/bashrc C. /home/.bashrc D. /home/profilerc E. ~/.bashrc

E. ~/.bashrc

Each question should start with 'Q:' or be successively numbered. - If there are choices, the first choice should start with 'A.'. - Each successive choice should start with the next letter and a period. - Each choice should be on a single line, but it is OK if it is longer than will fit in the text area and it wraps on its own.

Each successive choice should start with the next letter and a period.

You want to copy a directory, MyFiles, to a USB flash drive that uses the FAT filesystem. The contents of MyFiles are as follows: The USB flash drive is mounted at /media/usb, and so you type cp -a MyFiles/ /media/usb. What problem will occur when you attempt to copy these files?

Everything will be fine; the command will work correctly. One file's name will be changed during the copy. One file will be missing on the USB flash drive. The command will fail because it tries to create links. The MyFiles directory will be copied, but none of its files will be copied. Next Mark For Review

Which keystrokes invoke the pico or nano search function? (choose two)

F6 and Ctrl W

dhcpd is a common DHCP client for Linux.

FALSE

WEP provides highest available level of wifi security

FALSE, WPA2

Which file hierarchy structure was created to give a standardization to the Linux filesystem structure?

FHS

A user types myscript laser.txt to run a script called myscript. Within myscript, the $0 variable holds the value laser.txt. (T/F)

False

It is impossible to run a bash script if it hasn't had an executable but set on its file

False

Linux stores information on its groups in the /etc/groups file. (T/F)

False

The gzip program generally produces more compact compressed files than does the bzip2 program. True False

False

True or False: (..) means the current directory so typing $ cd ../ will put you into the current directory?

False

True or False: A (user) job is a process that only be started from the user or system administrator

False

True or False: At least two partitions are required in order to create a disk partition

False

True or False: In the /etc/passwd file, the second field contains a letter p to indicate that shadow passwords are being used

False

True or False: Linux Professional Institute Certification is a Distro specific Certification

False

True or False: Linux is built as a single-user environment

False

True or False: NFS for Windows and Linux is a tool to mount a Linux filesystem on a Windows machine

False

True or false: All Bash scripts must be built from functions. True False

False

True or false: All user accounts are necessarily defined in /etc/passwd and /etc/shadow. True False

False

True or false: It's impossible to run a Bash script if it hasn't had an executable bit set on its file. True False

False

True or false: Linux stores information on groups in the /etc/groups file.

False

True or false: The /etc/group file supports linking each user to a maximum of one group. True False

False

True or false: The KDE Plasma workshop includes a single KDE program

False

True or false: The following script launches three simultaneous instances of the terminal program. #!/bin/bash terminal terminal terminal

False

True or false: The following script launches three simultaneous instances of the terminal program. #!/bin/bash terminal terminal terminal

False

True or false: The following script launches three simultaneous instances of the terminal program. #!/bin/bash terminal terminal terminal

False

True or false: To compress files archived with the zip command, you must use an external compression program such as gzip or bzip2 in a pipeline with zip.

False

True or false: To save a text file in Vi, you should press Ctrl+S. True False

False

True or false: Unicode is useful for encoding most European languages but not Asian languages.

False

True or false: You can easily damage your Linux installation by mistyping an rm command when you log into your regular account.

False

Unicode is useful for encoding most European languages but not Asian languages. (T/F)

False

True or false: The /var/log/messages file always holds general-purpose log entries

False Although /var/log/messages is a common name for a general-purpose log file, not all distributions use this name; some use /var/log/syslog or some other file for this purpose.

True or false: You can delete any file on the computer by using rm as an ordinary user.

False Because of Linux's security features, you can only delete files in directories to which you have write access. As an ordinary user, you should not have write access to most of the system directories, so rm won't allow you to remove most system files.

True or false: All user accounts are necessarily defined in /etc/passwd and /etc/shadow.

False Some computers use network account databases, which supplement local account configuration files with those stored on a remote network server.

True or false: GUI account management tools provide more options than their text-mode counterparts.

False Text-mode account management tools invariably provide as many or more options than do GUI account management tools.

True or false: The /etc/group file supports linking each user to a maximum of one group.

False The question's limitation applies to the default group specified in /etc/passwd. In /etc/group, each line can link one group to an arbitrary number of users.

True or false: Typing ls *.* at a Bash prompt is guaranteed to show you all the files in the current directory.

False The specified command shows you all the files whose names include a dot (.), but there's no guarantee that all the files in the directory will include a dot in their names.

True or False: whoami provides more information than id.

False The whoami command only responds with the current session user's name, id will give more details including numeric user and group ID and all the groups the user belongs to.

True or false: User ID numbers are linked to usernames in a way that ensures the mapping is identical on all computers.

False User ID numbers are assigned to usernames in an arbitrary way, so a given username may have different user ID numbers on different computers.

To run a GUI program in Linux, you must launch it from a desktop environment's menus.

False You can launch GUI programs in several ways, including using a desktop environment's menus or typing the program's filename in a terminal program

True or false: The /var/log/messages file always holds general-purpose log entries.

False Although /var/log/messages is a common name for a general-purpose log file, not all distributions use this name; some use /var/log/syslog or some other file for this purpose.

A user account's information is linked between the /etc/passwd and /etc/shadow files via the account's UID.

False, the name links both files

True or false: A user types myscript laser.txt to run a script called myscript. Within myscript, the $0 variable holds the value laser.txt.

False. The $0 variable holds the name of the script—myscript in this example. To access the first parameter passed to the script (laser.txt), the script must use the $1 variable.

True or false: The following script launches three simultaneous instances of the terminal program. terminal terminal terminal

False. The effect of the specified script is to launch three instances of terminal sequentially; the second launches only after the first terminates, and the third launches only after the second terminates. To do as the question specifies, you should include a trailing ampersand (&) in at least the first two calls to terminal (as in terminal &); this causes them to run in the background, so that the script can continue to execute to launch the remaining instances of terminal.

D. LibreOffice, like most word processors, uses a binary format that can't be properly parsed using an ASCII or Unicode text editor. Thus nano won't be useful in examining such a document, making option D correct. The nano text editor can handle ASCII or Unicode format, so the text files described in options A and C are incorrect. The other document types described in options B and E are all likely or certain to be stored in ASCII or Unicode format, making them incorrect choices.

For which type of file is nano least likely to be useful for examining or editing? A) A text file encoded in Unicode B) A shell script file C) A text file encoded in ASCII D) A LibreOffice word processing document E) A Linux configuration file

A. In the vi editor, dd is the command-mode command that deletes lines. Preceding this command by a number deletes that number of lines. Thus option A is correct. Although yy works similarly, it copies (yanks) text rather than deleting it, so option B is incorrect. Option C works in many text editors, but not in vi. Option D works in emacs and similar text editors (including pico and nano), but not in vi. Option E, or something similar, works in many GUI text editors, but not in vi, so it is incorrect.

How would you remove two lines of text from a file when using vi? A) In command mode, position the cursor on the first line and type 2dd. B) In command mode, position the cursor on the last line and type 2yy. C) In insert mode, position the cursor at the start of the first line, hold down the Shift key while pressing the down-arrow key twice, and press the Delete key on the keyboard. D) In insert mode, position the cursor at the start of the first line and press Ctrl+K twice. E) Select the text with the mouse, and then select File ➢ Delete from the menu.

Escaping

If you want to match one of the special characters, such as a dot, you must escape it—that is, precede it with a backslash (\). For instance, to match a computer hostname (say, twain.example.com), you must escape the dots, as in twain\.example\.com.

How would you remove two lines of text from a file when using vi?

In command mode, position the cursor on the first line and type 2dd.

You type mkdir one/two/three and receive an error message that reads, in part, No such file or directory. What can you do to overcome this problem?

Issue three separate mkdir commands: mkdir one, then mkdir one/two, and then mkdir one/two/three.

What is the purpose of the system account with a UID of 0? It is the system administration account It is the account for the first ordinary user Nothing; UID is left intentionally undefined It varies from one distribution to another It is a low-privilege account that is used as a default by some servers

It is the system admin account

What does the pwd command accomplish?

It prints the name of the working directory.

If you were in a Linux command line terminal and saw a system account with the UID of 0, what would that indicate?

It's the system administrator (root) account.

_____ are collections of programming functions that can be useful to many programs.

Libraries Subdirectories Next Mark For Review

Who developed and maintains the Linux kernel, an operating system kernel for a UNIX like operating system?

Linus Torvalds

What will be the output of the cat /etc/passwd command?

List of users created on a Linux computer

Which of the following would you use the yum command to install or upgrade applications? (choose all that apply)

Red Hat CentOS Fedora

Which of the following are considered RPM-based Linux distributions? (choose all that apply)

Red Hat CentOS SUSE Enterprise Fedora

Which of the following would you use the yum command to install or upgrade applications? (choose all that apply)

Red Hat, Fedora, CentOS

Which of the following are considered RPM-based Linux distributions? (choose all that apply)

Red Hat, Fedora, CentOS, SUSE Enterprise

What are three communication channels for standard input and output?

STDIN, STDOUT, STDERR

What are the two types of outputs that can result using basic redirection operators in Linux?

Standard Output & Standard Error

What is the effect of the following command? $ myprog &> input.txt

Standard output and standard error from myprog are written to input.txt.

files are those that control how the computer operates.

System

How do the > and >> redirection operators differ?

The > operator creates a new file or overwrites an existing one; the >> operator creates a new file or appends to an existing one.

What is the effect of the following command? $ pr report.txt | lpr

The file report.txt is formatted for printing and sent to the lpr program.

what does the string -rwxrwx mean?

The file's owner and members of its group may both read, write, and execute the file, but other users have no access to it.

Which of the following type of user information might you find in the /etc/passwd file? (choose three)

The user's account home directory The UID The path to the user's default text-mode shell

Multiple Possible Strings

The vertical bar (|) separates two possible matches; for instance, car|truck matches either car or truck

What is the purpose of conditional expressions in shell scripts?

They display information about the script's computer environment. They enable the script to take different actions in response to variable data. They enable scripts to learn in a manner reminiscent of Pavlovian conditioning. They cause scripts to run only at specified times of day. Next Mark For Review

What is the purpose of conditional expressions in shell scripts?

They enable the script to take different actions in response to variable data

What is the purpose of conditional expressions in shell scripts?

They enable the script to take different actions in response to variable data.

Ctrl+\, Esc+R

Three keystrokes that can initiate a search-and-replace operation in nano are F14, _______, and _______.

zz

To save a file and exit the vi text editor in command mode, type _______.

ASCII is limited to 72 characters—one for each uppercase letter, lowercase letter, digits, and ten punctuation symbols. True False

True

HTML is an example of a formatted text file format. True False

True

Including the file type code, symbolic links always have permissions of lrwxrwxrwx.

True

Nano is an extended variant of pico. True False

True

True or False: Booting and shutting down is a system process

True

True or False: By convention, local variables are all lowercase with components separated by underscores

True

True or False: If no directory index file is found mod_autoindex will generate a listing of the directory contents

True

True or False: In Perl, the if structure is much more like C style languages and much simpler

True

True or False: The Command-Line interpreter or user interface for Linux is called the Terminal

True

True or False: Use "dig" command to query IP addresses from domain addresses

True

True or False: Use ; to separate statements if multiple commands are on the same line

True

True or False: Use the following command to check if Apache2 is running: "service apache2 status"

True

True or False: When you first login, your current working directory is your working directory

True

True or False: cfdisk provides a command based while fdisk provides a text user interface

True

True or False: dpkg can be used to install or remove a .deb package

True

True or False: ls does not, in fact, cause all the files in your home directory to be listed, but only those ones whose manes does not begin with a dot (.)

True

True or False: structure definition is one of the file system tasks that a Linux administrator might need to perform

True

True or False? You've typed rmdir junk to delete the junk directory, but this command has failed because junk contains word processing files. To do the job, you type rm -r junk.

True

True or false: A carat (^) represents the start of a line in regular expressions. True False

True

True or false: Setting the SUID bit on a program file that's owned by root causes it to execute with root privileges no matter who runs it.

True

True or false: The find command enables you to locate files based on their sizes.

True

True or false: The lowest UID number used for user accounts on Linux systems varies from one installation to another. True False

True

True or false: The regular expression Linu[&c.circ;x].*lds matches the string, Linux Torvalds.

True

True or false: The who command reveals the remote computer from which users have logged in, when they've logged in remotely. True False

True

True or false: You can create a symbolic link from one low-level filesystem to another.

True

True or false: You can record the output of a command in a variable by enclosing the command in backticks, as in myout=`whoami`. True False

True

True or false: You can set a directory's time stamps with the touch command.

True

True or false: You can use common external commands, such as find and sed, in your Bash scripts. True False

True

You can use common external commands, such as find and sed in your bash scripts

True

True or false: By default, useradd copies a set of user configuration files from /etc/skel when creating a new user account.

True Default user configuration files give users a head start on configuring their accounts and enable system administrators to set user default options. They're copied from /etc/skel unless you specify another location with the --skel (-k) option to useradd.

True or false: Both RPM and Debian packages can specify that they require other packages. The package system will then refuse to install the package unless these dependencies are met or you provide an override option.

True Dependency information is critical for package management, and it works as the question specifies.

True or false: With most distributions, the contents of optical discs, USB flash drives, and other removable media appear in subdirectories of /media.

True Most distributions automatically mount removable media in their own subdirectories of /media. This practice is not universal, but it is very common, particularly when running desktop environments such as GNOME, KDE, or Xfce.

True or false: You can modify graphics files from a text-mode login using Linux.

True The ImageMagick suite of graphics programs is text-based; you can use it to convert file formats, add frames to images, resize images, and so on, all from the command line.

True or false: KDE is built atop the Qt widget set.

True The K Desktop Environment (KDE) is built using the Qt GUI library (widget set), as the question specifies.

True or false: Pressing the M key in top causes the display to change to sort processes by memory use.

True The M key in top works as specified.

True or false: Symbolic links always have permissions of lrwxrwxrwx.

True The leading l identifies the file as a symbolic link. The remaining characters indicate that all users have full access to the link file, but the linked-to file's permissions are what control what users can actually do with the file.

True or false: You can use a recordable optical disc to transfer data from a Linux computer to a Windows computer.

True The most common optical disc formats (CD, DVD, and Blu-Ray) and filesystems (ISO-9660 and UDF) work equally well on both Linux and Windows. Thus, you can use an optical disc to transfer data from Linux to Windows, or vice-versa.

True or false: When operating on large files, the mv command works very quickly when the target directory is on the same low-level filesystem as the original file, but much more slowly when this isn't the case.

True The mv command moves or renames files, and it works by rewriting low-level filesystem data without touching the file's data when the target is on the same filesystem as the original. Thus, it can work quickly when this is the case. When moving a file across filesystems, though, mv must copy the data, which can take a while when the file is large.

True or false: The ps program enables you to view the process table.

True The ps program is one of the primary means of viewing the process table, which holds information on running processes.

True or False: As a general rule, you should employ extra care when running programs as root.

True The root account is very powerful and can be disastrous if something is done carelessly.

True or false: xinetd is a super server.

True The term super server refers to a server that listens for connection attempts on behalf of other servers and that launches those other servers only as needed. The two most common super servers on Linux are inetd and xinetd.

True or false: Linux supports two types of text-mode output to the screen, which you can send to separate files or display devices.

True The two types of output are standard output and standard error.

True or false: Pressing the up arrow key in Bash reveals commands you've recently typed.

True The up arrow key enters previous commands from Bash's history in your command line, which can be helpful when typing a series of similar commands.

True or false: Partitioning a disk can enable you to install multiple OSes on one computer

True You can assign one OS to reside on one partition (or set of partitions) and another OS to reside on another. This is one of several purposes for disk partitions

True or false: Partitioning a disk can enable you to install multiple OSes on one computer.

True You can assign one OS to reside on one partition (or set of partitions) and another OS to reside on another. This is one of several purposes for disk partitions.

False. Support for underlining, italics, multiple fonts, and similar advanced formatting features is present in word processors, not plain-text editors—even GUI text editors lack such support.

True or false: GUI text editors for ASCII are superior to text-mode ASCII text editors because the GUI editors support underlining, italics, and multiple fonts.

True. Due to its ease of use, nano is typically the best editor to learn first.

True or false: If you have never used a text editor before, the nano text editor is usually the best one to learn first.

False. Unicode provides support for most alphabets, including the huge logographic systems used in common East Asian languages.

True or false: Unicode is useful for encoding most European languages but not Asian languages.

Linux supports two types of text-mode output to the screen, which you can send to separate files or display devices.

True. Standard Output. Standard Error.

True or false: Valid looping statements in Bash include for, while, and until.

True. You can use for to execute a loop a fixed number of times, whereas while and until execute until a test condition is no longer met or is met, respectively.

What is the surest way to run a program (say, myprog) that's located in the current working directory?

Type ./ followed by the program name: ./myprog.

In pico or nano, you can paste text that you've cut or copied earlier by pressing Ctrl+____.

U

in nano or pico, you can paste text that you copied by typing in Ctrl+

U

What info does the ID command provide

UID number, username, Current group

A text encoding method that can use single- or multiple-byte encodings to store text using most human alphabets is known as _________.

Unicode

a text encoding method that can use single or multiple byte encodings to store text using most human alphabets is known as what?

Unicode

How does man display information by default on most Linux systems?

Using the less pager

What is the effect of the following short script, cp1, if it's called as cp1 big.c.big.cc? #!/bin/bash cp $2 $1

What is the effect of the following short script, cp1, if it's called as cp1 big.c.big.cc? #!/bin/bash cp $2 $1 It has the same effect as the cp command"copying the contents of big.c to big.cc. It compiles the C program big.c and calls the result big.cc. It copies the contents of big.cc to big.c, eliminating the old big.c. It converts the C program big.c into a C++ program called big.cc. Next Mark For Review

u

While in vi's command mode, you can type _______ to undo a change.

To save a file and exit the vi text editor in command mode, type ____

ZZ

Which character represents the start of a line in a regular expression?

^

Which character that represents the start of a line in a regular expression?

^

You can record the output of a command in a variable by enclosing the command in backticks, as in myout=.

`whoami`

Which of the following are risks you take when you browse the Web as an ordinary user on a properly-configured Linux system? (Select all that apply.)

a. Data transferred to or from a Web site can be intercepted, possibly exposing sensitive data to theft. b. A Web site with malicious dynamic content could steal your personal data files. A, B Most Web sites are unencrypted, so data transferred from the site and your computer, or vice-versa, can be intercepted, as option A suggests. (Most sites that transfer sensitive data employ encryption, but this isn't universally true.) Some Web sites deliver mini-programs that run on your computer, and if such a site delivers a malicious program, it could do just about anything, including steal your personal data files, as option B suggests. If you run the Web browser as an ordinary user, though, such a malicious program could not create a new account, so option C is incorrect. Likewise, your Linux login password is safe, so option D is incorrect. A Windows virus won't run on Linux at all, much less harm your hardware, so option E is incorrect.

If you wanted to run/execute a script called my-script, what could you type in the Linux terminal shell to accomplish this?

apt-get a+x ./myscript chmod a+x ./my-script su a+x myscript Next Mark For Review

define a linux group a. /etc/grps b. /etc/group c. /etc/groups d. /etc/grp e. /etc/gids

b

Which of the following programs are Linux file managers? (Select all that apply.)

b. Thunar d. Konqueror e. Nautilus Response Feedback: Answer: B, D, E Thunar is a file manager associated with Xfce, Konqueror is a file manager and Web browser associated with KDE, and Nautilus is a file manager associated with GNOME. Thus, options B, D, and E are all correct. Thunderbird is an e-mail client, and Apache is a Web server program, so options A and C are both incorrect.

What is another name for a bash shell script that you might see?

bigbash hashpling Next Mark For Review

Which command would create a zip file containing the files, holiday.tif and desc.txt, and compress it as much as possible? a. zip -1 holiday.tif desc.txt trip.zip b. zip -1 trip.zip holiday.tif desc.txt c. zip -9 trip.zip holiday.tif desc.txt d. zip -9 holiday.tif desc.txt trip.zip e. zip -c holiday.tif desc.txt trip.zip

c

What Bash scripting command can you use to control the program flow based on a variable that can take many values (such as all the letters of the alphabet)?

case

Which of the following statements acts as a good replacement of the if-then-else-fi statement?

case

The files afile.txt and AFile.TXT can both exist on a Linux filesystem because Linux treats filenames in a ____________ way.

case sensitive

Which of the following commands will number the lines in aleph.txt? (Select three.)

cat -b aleph.txt nl aleph.txt cat -n aleph.txt

Pressing the M key in top does what?

change to sort processes by memory use

You're using bash, and you type emacs to launch the emacs editor. In this case, emacs is bash's ____________.

child

If you wanted to run/execute a script called my-script, what could you type in the Linux terminal shell to accomplish this?

chmod a+x ./my-script

The command _______ :users somefile.txt changes the group affiliation of somefile.txt to users.

chown

Which of the following programs enable root to set the ownership of files? Select one or more: a. chown b. usermod c. touch d. Nautilus e. chmod

chown, nautilus

You want to copy the contents of the ~/important directory, including all its subdirectories, to /media/usb. What command can you type to accomplish this goal?

cp -R ~/important /media/usb

The __________ command can extract specified data fields from a file's records.

cut

Which of the following regular expressions will match the strings dog, dug, and various other strings but not dig?

d[o-u]g

Programs that can look up DNS information include host, nslookup, and _____.

dig

Which of the following commands is implemented as an internal command in bash?

echo

Which of the following text editors runs as a text-mode program when launched in text mode but also provides a GUI version for use in a GUI environment? emacs NEdit nano KWrite Vi

emacs

an editor that runs as a text-mode program when launched in text mode and also provides a GUI version for use in a GUI environment>

emacs

You're logged in as root and you type passwd auser to change auser's password. What information will passwd ask you to enter?

enter password two times

Which of the following statements would you need to include in a case statement to denote the end of the case statement?

eol esac easc Next Mark For Review

What Bash scripting keyword terminates a case statement? esac end } term casend

esac

Which of the following statements is included in a case statement to denote its end?

esac

You're writing a script that will be called by other scripts. You want to signal abnormal termination of your script by passing a value of 8 to the external script under some circumstances. What command can you use in your own script to do this? die 8 term 8 exit 8 pass 8 send 8

exit 8

You have a data file, data.txt, to be processed by a particular program. However, the program cannot handle data separated by tabs. The data.txt file's data is separated by a tab stop at every eight characters. What command should you use before processing the data file with the program?

expand data.txt > data1.txt

True or false: Typing ls *.* at a Bash prompt is guaranteed to show you all the files in the current directory.

false

True or False: the gzip program generally produces more compact compressed files than does the bzip2 program

false, gzip is the least compressed

Which of the following commands executes very slowly and displays the full path of a file instead of just a filename?

find

You've received an ASCII text file (longlines.txt) that uses no carriage returns within paragraphs but two carriage returns between paragraphs. The result is that your preferred text editor displays each paragraph as a very long line. How can you reformat this file so that you can more easily edit it (or a copy)?

fmt longlines.txt > longlines2.txt

A computer's full hostname is franklin.example.org. The machine name portion of this hostname is

franklin

Which command would reveal the total RAM statistics abot your Linux system?

free

what program produces memory status of your computer, includes total memory available, the amount used, the amount unused?

free

The term _________ refers to the use of wildcards in filename specifications.

globbing

do users have to be logged in when you change their UID numbers with usermod?

no

A(n) ________ environment means that a person cannot deny actions, and the sudo command helps establish this environment.

nonrepudiation

Using the screenshot below, which Linux command line tool would give you the following output?

nw wc grep

What keystroke creates a new blank line immediately below the current one, when typed in Vi's command mode? ZZ i o :wq 1yy

o

Which of the following consists of supporting files for an application that are installed on a Linux computer?

package

Most Linux distributions maintain information on what packages are installed in the ____________________. (Two words.)

package database

What could you type in a Linux command line terminal shell to see a list of all process IDs (PID) on your computer?

ps

Which of the following commands displays the name of the directory in which you're working?

pwd

What command can you use to retrieve user input into a variable in a Bash script? inline read get getline input

read

what command can you sue to retrieve user input into a variable in a bash script?

read

2>

redirects standard error, not input and overwrites target file

>

redirects standard output and overwrites target file

To uninstall an application using the apt-get command, you would type apt-get _____.

remove

You want to run the following command inside your Linux terminal: iptables -L but know you will need to have root access to do so. If you are logged in under a basic user account, which command could you add to give you root access for just this command?

sudo iptables -L

You want to run the following command inside your Linux terminal: iptables -L but know you will need to have root access to do so. If you are logged in under a basic user account, which command could you add to give you root access for just this command?

sudo iptables -L (Your Answer)

Which of the following commands should be used to compress more than two files?

tar

Which of the following syntaxes will you use to extract a file using the tar command?

tar -zvf {.tgz-file}

If you are in the Vi text editor command mode, which keystroke would you type to undo a change?

u

While in vi's command mode, you can type __ to undo a change.

u

Which of the following commands outputs the total time the computer's been running?

uptime

To learn who is currently logged into the computer and what programs they're currently running, you can type ____.

w

You can use the ____ command to count the characters, words, and lines in a text file.

wc

Being a member of the _____ group gives you extra privileges, which often include the right to use sudo.

wheel

Which command can be used to display the path names of the files executed in the current environment?

which

A _____ loop executes for as long as its condition is true.

while

Spaces and tabs are examples of ________, which separate elements in many configuration files

whitespace

You can type _____ to learn your current username and nothing more?

whoami

to learn your current username and nothing more

whoami

Which of the following operators is used to connect two or more than two commands on the Linux operating system?

|

You use the ___ character to separate two strings, either of which should match, in an extended regular expression. ! ^ | ~

|

Which symbol is used to separate two strings, either of which match, in an extended regular expression

|(bar)

To obtain a color-coded file listing, if your distribution doesn't produce one by default, you would type ls _____.

Answer: --color

You want to copy a set of files but be prompted before cp overwrites any existing files. You would use the ___ option to cp to accomplish this goal.

Answer: --interactive or -i

The _________ option to tar causes it to back up only the specified low-level filesystem; if another filesystem is mounted within the directory you say to back up, those files will be ignored.

Answer: --one-file-system

You can type useradd ____ nemo as root to create the nemo account without creating a home directory for nemo.

Answer: -M

You can type Xorg ________, as root, to have X create a default configuration file that you can then modify.

Answer: -configure

The user arnold is currently logged in. Despite this fact, you want to delete his account without first logging him off. You don't want to delete arnold's files. To accomplish this goal, you type userdel ___ arnold.

Answer: -f or --force

What can you use to search man pages for key words? (Which option)

Answer: -k The -k is the option to search for keywords in man pages.

What type of information can netstat provide?

Answer: A, B, C netstat can provide information on network interfaces similar to what ifconfig provides (option A), routing table data similar to what route provides (option B), and a list of open ports (option C). It can not provide round-trip network packet travel time similar to what ping provides (option D) or the identities of broken routers similar to what traceroute provides (option E).

What term refers to the worldwide system of servers that translates between IP addresses and hostnames?

Answer: B The question describes the Domain Name System (DNS), so option B is correct. The Dynamic Host Configuration Protocol (DHCP) delivers network configuration information to computers when they boot, so option A is incorrect. The Transmission Control Protocol/Internet Protocol (TCP/IP) is the overarching standard used for most networking purposes, so option C is incorrect. IP version 6 (IPv6) is an addressing system that supports immensely more addresses than does the older IPv4, so option D is incorrect. The Secure Shell (SSH) is an encrypted remote login protocol, so option E is incorrect.

Which of the following programs enable root to set the ownership of files? (Select all that apply.)

Answer: B, D command updates a file's time stamps, but does not change its ownership, so option E is incorrect.touch command can change various account features, but not file ownership, so option C is incorrect. The usermod command enables changing the mode (permissions) of files, but not their ownership, so option A is incorrect. The chmod, it enables you to change the ownership of files, so option D is also correct. The root command is a text-mode tool for changing the ownership and group association of files, so option B is correct. Nautilus is a GUI file manager, and when it's run as chownThe

What program can you use to manually bring up a network interface in Linux?

Answer: D The ifconfig program does as the question specifies (among other things), so option D is correct. The iwlist command displays information on Wi-Fi networks but does not bring up a network interface, so option A is incorrect. The route command displays or modifies routing tables, but does not bring up a network interface, so option B is incorrect. The telnet command is a remote-access and network diagnostic tool, but it does not bring up a network interface, so option C is incorrect. The traceroute command produces network diagnostic information, but it does not bring up a network interface, so option E is incorrect.

You want to create a directory called ~/Documents/papers, but you're not sure that the ~/Documents directory exists. What command can you type to create the desired directory and its parent directory if it doesn't already exist?

Answer: E The -p option to mkdir creates parent directories if they don't already exist, so option E is correct. The -a, --recursive, -R, and -r options are all fictitious, so options A, B, C, and D are all incorrect.

The _____ filesystem is very old but is supported by almost every OS, making it a good choice for interoperability.

Answer: FAT

The _____ library provides drivers to control scanners. (Provide the acronym for the library's name.)

Answer: SANE

Postfix is a server that implements the ______ protocol. (Provide the protocol's acronym

Answer: SMTP

The files afile.txt and AFile.TXT can both exist on a Linux filesystem because these filesystems are ____________.

Answer: case-sensitive

The command _______ :users somefile.txt changes the group affiliation of somefile.txt to users.

Answer: chown

The /proc/______ pseudo-file holds data on your CPU, such as its model name and clock speed.

Answer: cpuinfo

You want to delete the oldproj group, so you type ______ oldproj.

Answer: groupdel

The first process to be run by the Linux kernel is normally called _______

Answer: init

The character __ identifies a symbolic link in the 10-character symbolic permission string that's associated with a file.

Answer: l (Lower case L) Found on pg 142

A condition in which a program allocates more and more memory but doesn't use the memory it allocates is called a ______ ______ (two words).

Answer: memory leak

The process that launched a given process is known as the ________ process

Answer: parent

An attempt to acquire sensitive data directly from victims by posing as a trusted Web site or authority is known as ____.

Answer: phishing

An Internet site that hosts software that you can install with yum, APT, or a similar tool is known as a __________.

Answer: repository

UIDs below 500 or 1000 (depending on the distribution) are reserved for use by __________ accounts.

Answer: system

You can use the ____ command to count the characters, words, and lines in a text file.

Answer: wc

You can type _____ to learn your current username and nothing more?

Answer: whoami

You use the ___ character to separate two strings, either of which should match, in an extended regular expression.

Answer: | (pipe)

What type of information will you find in /etc/passwd for ordinary user accounts? (Select all that apply)

Answers A, C, E ....

You type a command into bash and pass a long filename to it, but after you enter the command, you receive a File not found error message because of a typo in the filename. How might you proceed?

Any of these.

You want to copy the contents of the ~/important directory, including all its subdirectories, to /media/usb. What command can you type to accomplish this goal?

B To copy an entire directory tree, you must use a recursive copy parameter, such as --recursive, -R, or -r. (An archive copy, as in --archive or -a, will also work.) Of the options shown here, only B includes one of these parameters, so it is correct. Option A lacks any parameters to cp, so it won't work. Option C's -u option performs an update copy—it copies files only if the original file is newer than any file of the same name at the target location. Option D's -i performs an interactive copy, querying the user before overwriting existing files. Option E's -f option forces cp to overwrite existing files without prompting.

Which of the following programs enable root to set the ownership of files? (Select all that apply.) A. chmod B. chown C. usermod D. Nautilus E. touch

B and D

Immediately after creating a shell script called a_script.sh in a text editor, which method will not work to run the script? A Typing bash a_script.sh at the command line. B typing .a/a_script.sh at the command line. C Typing . a_script.sh at the command line D Typing source a_script.sh at the command line. E Any of the above will work.

B typing .a/a_script.sh at the command line.

Which of the following programs are Linux file managers?

B, D, E Thunar is a file manager associated with Xfce, Konqueror is a file manager and Web browser associated with KDE, and Nautilus is a file manager associated with GNOME. Thus, options B, D, and E are all correct. Thunderbird is an e-mail client, and Apache is a Web server program, so options A and C are both incorrect.

Which of the following tools can you use to identify running processes? (Select all that apply.)

B, E The ps and top programs are text-mode commands to identify running programs, so options B and E are both correct. The df program summarizes disk usage, bg shifts a suspended program into background execution, and mem summarizes memory use, so options A, C, and D are all incorrect.

What file stores the network's encrypted passwords and policies? A. /etc/passwd B. /etc/shadow C. /etc/password D. /etc/group

B. /etc/shadow

What file stores the default files and directories when a new user is created? A. /usr/newids B./etc/skel C. /etc/default D. /etc/usr/log

B. /etc/skel

Which of the following is not a a /proc file system file that provides detailed information about various hardware devices and other Linux kernel information? A. /proc/zoneinfo B. /proc/momentum C. /proc/cpuinfo D. /proc/mounts

B. /proc/momentum

The tail basic command will output the last _____ lines of a file. A. 5 B. 10 C. 15 D. 20 E. 25

B. 10

What is the numeric relational operator that stands for equal when using Perl? A. -eg B. == C. eq D. =

B. ==

What is an advanced packaging tool that simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages? A. PMT B. APT C. ACIS D. ACI E. ATM

B. APT

You see the following line in a script: mail -s "Error" -c abort < /tmp/msg root What is the effect of this line, if and when it executes? A. An email is sent to the user Error, the script is aborted using root privileges, and error messages are written to /tmp/msg. B. An email with the subject of Error and the contents from /tmp/msg is sent to the local users root and abort. C. An email with the subject of Error and the contents of /tmp/msg is sent to the local user root, and then the script is aborted. D. An email is sent with Error priority to the local user root, and the email system is then shut down with error messages being stored in /tmp/msg. E. An email with the subject of Error and contents of /

B. An email with the subject of Error and the contents from /tmp/msg is sent to the local users root and abort.

Which of the following outcomes will you get after executing the -cvf /tmp/etc.tar /etc command? A. Compressed File B. Archived File C. Extracted file D. Encrypted file

B. Archived File

Which of the following is a Linux software that can be used to create 3D images (Both stills and animations)? A. Audacity B. Blender C. The GIMP D. Image Magick E. Handbrake

B. Blender

Your SMTP email server, mail.luna.edu, receives a message addressed to postmaster@ mail.luna.edu. There is no postmaster account on this computer. Assuming the system is properly configured, how should the email server respond? A. Accept the message, but do so very slowly so as to tie up the sender's resources. B. Bounce the message so that the sender knows the account doesn't exist. C. Hold the message in the local mail queue until the postmaster account is created. D. Delete the message without bouncing it so as to reduce email clutter. E. Deliver the email to another account, either locally or on another computer.

B. Bounce the message so that the sender knows the account doesn't exist.

You examine your /etc/aliases file and find it contains the following line: root: jody What can you conclude from this? A. Email addressed to jody on this system will be sent to the local user root. B. Email addressed to root on this system will be sent to the local user jody. C. The local user jody has broken into the system and acquired root privileges. D. The local user jody has permission to read email directly from root's mail queue. E. The administrator may log in using either username: root or jody.

B. Email addressed to root on this system will be sent to the local user jody.

An operating system is software that provides the following services except A. Memory management B. Essential freedoms C. User interface D. Hardware device management E. Processor management

B. Essential Freedoms

Which of the following actions is performed when a file is uncompressed? A. Execute B. Extract C. Archive D. Remove

B. Extract

Which of the following organizations bases its philosophy on software licensing on a strong moral imperative that users should be able to modify their software? A. OSI B. FSF C. FOSS D. BSD E. MIT

B. FSF

True or false: You can easily damage your Linux installation by mistyping an rm command when you log into your regular account. A. True B. False

B. False

Which of the following is a tool for querying hosts and domains with a graphical user interface? A. pingit -u B. Gnome-nettool C. who isit D. run-host

B. Gnome-nettool

What is the effect of the following short script, cp1, if it's called as cp1 big.c.big.cc?

B. It compiles the C program big.c and calls the result big.cc. C. It copies the contents of big.cc to big.c, eliminating the old big.c. D. It converts the C program big.c into a C++ program called big.cc. E. The script's first line is invalid, so it won't work.

You can remotely log into a Linux terminal with A. SUX B. SSH C. Remote system Login D. SPS E. System Log

B. SSH

Which of the following actions does the find command perform? A. Matching a pattern in a file B. Searching a file in a directory C. Changing text in a file D. Listing all hidden files and directories

B. Searching a file in a directory

How can you browse to a new node using the standard info documentation reader? A. Type the letter corresponding to the first character of the link. B. Select a link using the arrow keys and then press the Enter key. C. Move the mouse pointer over the link and click it. D. Type the number displayed next to the link you want to read. E. None of the above.

B. Select a link using the arrow keys and then press the Enter key.

What are the two types of outputs that can result using basic redirection operators in Linux?

B. Standard output D. Standard error

You're logged in as root and you type passwd auser to change auser's password. What information will passwd ask you to enter? A. The root password and the new password, two times B. The new password, two times C. auser's old password and the new password, two times D. The new password once E. None of the above; root can't change another user's password

B. The new password, two times

You've just installed MySQL and run it by typing mysql. How would you create a database called fish to store data on different varieties of fish? A. Type NEW DATABASE fish; at the mysql> prompt. B. Type CREATE DATABASE fish; at the mysql> prompt. C. Type NEW DATABASE FISH; at the mysql> prompt. D. Type DATABASE CREATE fish; at the mysql> prompt. E. Type DB CREATE fish; at the mysql> prompt.

B. Type CREATE DATABASE fish; at the mysql> prompt.

Which of the following is not an arithmetic operator in a bash script? A. -- B. \ C. * D. % E. +

B. \

Which of the following programs enable root to set the ownership of files? A. chmod B. chown C. usermod D. Nautilus E. touch

B. chown & D. Nautilus

What is the Linux command that allows you to switch shells? A. chgrp B. chsh C. select D. mksh E. enable

B. chsh

You want to copy the contents of the ~/important directory, including all it's subdirectories, to /media/usb. What command can you type to accomplish this goal? A. cp ~/important/media/usb B. cp -R ~/important/media/usb C. cp -u ~/important/media/usb D. cp -i ~/important/media/usb E. cp -f ~/important/media/usb

B. cp -R ~/important/media/usb

What command is used in order to check partition information? A. cwk B. fdisk C. part -ch D. difig -h E. chech.pt

B. fdisk

A super server daemon that provides Internet services is : A. /etc/services B. inetd C. netek -i D. /etc/inet/confn

B. inetd

Which command can be used with a pipe to see pages one at a time on a long list? A. grep B. less C. tee D. tail E. each

B. less

Which Linux command will allow you to create a new directory? A. cr dir B. mkdir C. dir mk D. make -d E. new dir

B. mkdir

Which of the following syntaxes will you use to extract a file using the tar command? A. tar -cvf {.tgz-file} B. tar -zxvf {.tgz-file} C. tar -xvf {.tgz-file} D. tar -zwvf {.tgz-file}

B. tar -zxvf {.tgz-file}

If you are in the Vi text editor command mode, which keystroke would you type to undo a change? A. b B. u C. d D. a

B. u

What process shell command retrieves the time of the last system boot? A. runlevel B. who -b C. who -r D. start -b

B. who -b

What is a protocol used for querying the registered uses of a web resource, such as a domain name? A. Linux host B. whois C. xinetd D. all of the above

B. whois

What are two forms of regular expressions used in Linux?

Basic, Extended

What does the permission string -rwxrwx--- mean? A. The file's owner may read, write, and execute the file, but nobody else may access it. B. The file is a directory. The directory's owner and members of its group may read, write, and search it, but other users have no access to it. C. The file's owner and members of its group may both read, write, and execute the file, but other users have no access to it. D. All users of the computer may read, write, and execute the file. E. The file is a directory. All users of the computer may read, write, and search the directory.

C

Where do most drivers exist on a Linux system?

C Drivers manage hardware, and as such, they're most commonly part of the Linux kernel, so option C is correct. Some drivers reside in libraries (option A) or in application programs (option D), but these locations are less common than the kernel, so options A and D are both incorrect. Firmware is software that's part of the hardware, and although firmware is important, it's distinct from drivers, so option B is incorrect. Configuration files can sometimes affect how drivers work, but they are not themselves drivers nor do they contain drivers, so option E is incorrect.

What does the permission string -rwxrwx--- mean?

C Option C correctly summarizes the meaning of the specified permission string. The description in option A would be represented by -rwx------, which is not the string shown in the question. Option B would be correct if the string began with d, indicating a directory; but the leading - indicates a data file rather than a directory. Option D's description would require rwx in the last three characters of the permission string; but the --- indicates no world access. Option E combines the directory error of option B with the world-access error of option D, and so is incorrect.

Which regular expression string matches any sequence of characters of any length?

C The .* sequence matches any string of any length, so option C is correct. Option A matches a dot (.), which otherwise has a special meaning and so can't be used directly. Square brackets, as in option B, can surround a set of characters, any one of which will satisfy a match. A dot, as in option D, matches any single character. An asterisk (*), as in option E, specifies an arbitrary number of repeats of the previous match. (Hence, .* matches any number of characters, but neither character alone does the job.)

You type the following command and see the resulting output: $ ls -l test -rwxr-xr-x 2 rod users 111 Apr 13 13:48 test What is the meaning of the digit 2 immediately prior to the username (rod)?

C The number in the specified position represents the number of filenames that point to the file—in other words, the number of hard links to the file. Thus, option C is correct. Options A, B, D, and E all present fictitious descriptions of that field's meaning. (The file's size appears later on the line—it's 111 in this example.)

Where do most drivers exist on a Linux system?

C In the Linux kernel Drivers manage hardware, and as such, they're most commonly part of the Linux kernel, so option C is correct. Some drivers reside in libraries (option A) or in application programs (option D), but these locations are less common than the kernel, so options A and D are both incorrect. Firmware is software that's part of the hardware, and although firmware is important, it's distinct from drivers, so option B is incorrect. Configuration files can sometimes affect how drivers work, but they are not themselves drivers nor do they contain drivers, so option E is incorrect.

Which of the following is the most common type of interface for internal hard disks on desktop computers today?

C SATA The Serial Advanced Technology Attachment (SATA) interface is the dominant type of internal hard disk interface today, so option C is correct. The older Parallel ATA (PATA) interface was once common, but has long been surpassed in popularity by SATA, so option A is incorrect. The Small Computer Systems Interface (SCSI) interface once dominated on high-end installations and is still in use, but is not popular on desktop systems, so option B is incorrect. Enhanced Integrated Device Electronics (EIDE) is another name for PATA, so option D is incorrect. The Universal Serial Bus (USB) is a common interface for external devices, including hard disks and many other devices, but the question specifies an internal interface, so option E is incorrect.

What is the character that is used for comments when bash scripting? A. ? B. ; C. # D. / E. //

C. #

You've written a simple shell script that does nothing but launch programs. In order to ensure that the script works with most user shells, what should its first line read? A. ?!/bin/sh B. #!/bin/ls C.#!/bin/sh D.#!/bin/sh/root

C. #!/bin/sh

Which optional parameter would you use with the Linux sort command to ignore case sensitivity?

C. -f D. -d

Which regular expression string matches any sequence of characters of any length? A. \. B. [ ] C. .* D. . E. *

C. .*

"______" means the parent directory, which is the immediate upper level directory A. \ B. ; C. .. D. . E. /

C. ..

Which of the following files can be used to auto-mount a Windows shared drive? A. /etc/share B. /cse/spool C. /etc//fstab D. /var/etc/spool

C. /etc/fstab

What is the delimiter that is used at the end of Perl statements? A. : B. {} C. ; D. ,

C. ;

Which of the following is not a Linux distribution? A. Fedora B. Debian C. ABZ-Zip D. OpenSUSE E. RedHat

C. ABZ-Zip

What is the purpose of conditional expressions in shell scripts? A) They prevent scripts from executing if license conditions aren't met. B) They display information about the script's computer environment. C) They enable the script to take different actions in response to variable data. D) They enable scripts to learn in a manner reminiscent of Pavlovian conditioning. E) They cause scripts to run only at specified times of day.

C. Conditional expressions return a true or false response, enabling the script to execute one set of instructions or another or to terminate or continue a loop. Option C is another way of saying this, and so it is correct. Conditional expressions have nothing to do with license conditions (option A), displaying information on the environment (option B), Pavlovian conditioning (option D), or executing the script at certain times of day (option E). That said, conditional expressions could be used in the service of any of these goals, but that's not their purpose.

What is the Debian Package manager that is used in Debian and Debian-like systems such as Ubuntu? A. UBT B. DPS C. DPMS D. DMP E. DMPS

C. DPMS

Which of the following is NOT a function of the Linux kernel? A. Managing a computer's hardware. B. Providing mechanisms for programs to interact with each other. C. Displaying common GUI elements such as dialog boxes. D. Allocating CPU time to programs that run concurrently. E. Managing memory allocation, including managing swap space.

C. Displaying common GUI elements such as dialog boxes.

Which one of the following is not a Character device? A. Keyboard B. Serial Modem C. Hard disk D. Mouse E. Terminal

C. Hard Disk

Describe the effect of the following short script, cp1, if it's called as cp1 big.c big.cc: #!/bin/bash cp $2 $1 A. It has the same effect as the cp command—copying the contents of big.c to big.cc. B. It compiles the C program big.c and calls the result big.cc. C. It copies the contents of big.cc to big.c, eliminating the old big.c. D. It converts the C program big.c into a C++ program called big.cc. E. It interprets the big.c and big.cc files as bash scripts.

C. It copies the contents of big.cc to big.c, eliminating the old big.c.

What is the effect of the following SQL command, assuming the various names and data exist? mysql> UPDATE stars SET magnitude=2.25 WHERE starname='Mintaka'; A. It returns database entries from the stars table for all stars with magnitude of 2.25 and starname of Mintaka. B. It sets the value of the stars field in the magnitude set to Mintaka, using a precision of 2.25. C. It sets the value of the magnitude field to 2.25 for any item in the stars table with the starname of Mintaka. D. It combines the stars and magnitude=2.25 tables, returning all items for which starname is Mintaka. E. It updates the stars database, creating a new entry with a starname of Mintaka and a magnitude of 2.25.

C. It sets the value of the magnitude field to 2.25 for any item in the stars table with the starname of Mintaka.

Which of the following is a general-purpose server-side scripting language designed for web development? A. Apache B. Version C. PHP D. SQL

C. PHP

In what environment variable is the current working directory stored? A. PATH B. CWD C. PWD D. PRESENT E. WORKING

C. PWD

Which of the following is not a system monitoring program? A. Sysstat B. Vmstat C. Powerhouse D. Uptime

C. Powerhouse

A ________ is a place to store available software packages A. Deposit B. Storage Unit C. Repository D, Software Bank

C. Repository

Which of the following is a common Linux server program? A. GNOME B. The GIMP C. Samba D. LibreOffice E. Firefox

C. Samba

What is the key/key sequence that is used to automatically finish typing out a file location located in the current folder? A. Ctrl + space key B. Alt + del key C. Tab key D. Ctrl +t E. f key

C. Tab key

Which Linux desktop program is what would be used to provide a text-mode user interface inside a window? A. Xfce B. Dolphin C. Terminal D. Evolution E. Konquerer

C. Terminal

Where did the Linux kernel originate? A. American Telephone and Telegraph B. The Massachusetts Institute of Technology C. The University of Helsinki D. The University of California E. Apple Computer

C. The University of Helsinki

Describe the effect of the following short script, cp1, if it's called as cp1 big.c big.cc: #!/bin/bash cp $2 $1 A) It has the same effect as the cp command—copying the contents of big.c to big.cc. B) It compiles the C program big.c and calls the result big.cc. C) It copies the contents of big.cc to big.c, eliminating the old big.c. D) It converts the C program big.c into a C++ program called big.cc. E) The script's first line is invalid, so it won't work.

C. The cp command is the only one called in the script, and that command copies files. Because the script passes the arguments ($1 and $2) to cp in reverse order, their effect is reversed—whereas cp copies its first argument to the second name, the cp1 script copies the second argument to the first name. Option C correctly describes this effect. Option A ignores the reversed order of the arguments, so this option is incorrect. The cp command has nothing to do with compiling C or C++ programs, and neither does the script, making option B incorrect. Since cp is a simple file-copying command, it can't convert a C program into a C++ program, making option D incorrect. The script's first line is a valid shebang line, contrary to option E, so that option is incorrect.

What does the permission string -rwxrwx--- Mean? A. the file's owner may read, write and execute the file but nobody else may access it. B. The file is a directory. The directory's owners and members of it's group may read, write, and search it, but other users have no access to it. C. The file's owner and members of it's group may both read, write, and execute the file, but other users have no access to it. D. All users of the computer may read, write and execute the file. E. The file is a directory. All users of the computer may read, write, and search the directory.

C. The file's owner and members of it's group may both read, write, and execute the file, but other users have no access to it.

"_______" is a popular multiuser, multitasking OS that was developed at Bell Labs in the early 1970s A. Linux B. GNU C. UNIX D. Windows

C. UNIX

Which character that represents the start of a line in a regular expression? A. % B. | C. ^ D. &

C. ^

Which of the following basic commands will change directory or take the user back to /home? A. rm B. cp C. cd D. head E. tail

C. cd

The information that is represented in the /etc/passed file is delimited by what character? A. semicolon B. comma C. colon D. space

C. colon

What is the last statement/word used in a For Loop of a bash shell? A. stop B. rof C. done D. end for E. end

C. done

You're writing a script that will be called by other scripts. You want to signal abnormal termination of your script by passing a value of 8 to the external script under some circumstances. What command can you use in your own script to do this? A. die 8 B. term 8 C. exit 8 D. pass 8 E. send 8

C. exit 8

Which one of the following is not a Partition Management Tool? A. fdisk B. cfdisk C. fixdsk D. parted E. palimpsest

C. fixdsk

What is the CLI command used to list all fines in you home directory including those whose manes begin with a dot type? A. List all B. la C. ls -a D. la -s E. Ls -i

C. ls -a

All variables are of what data type when they are assigned? A. list B. num C. string D. char E. short

C. string

You've received a tarball called data79.tar from a colleague, but you want to check the names of the files it contains before extracting them. Which of the following commands would you use to do this? A. tar cvf data79.tar B. tar xvf data79.tar C. tar tvf data79.tar D. tar Avf data79.tar E. tar uvf data79.tar

C. tar tvf data79.tar

Which compression file format can be used across multiple operating systems (Linux, Windows, Mac OS) A. tar file B. xz file C. zip file D. pdf file

C. zip file

Which of the following actions is performed when a file is uncompressed? A.Execute B.Remove C.Extract D.Archive

C.Extract

Using the image below, what does the yellow dot best represent? A.Subdirectories B.Root C.Files D.Libraries

C.Files

Bracket Expressions

Characters enclosed in square brackets ([]) constitute bracket expressions, which match any one character within the brackets. For instance, the regular expression b[aeiou]g matches the words bag, beg, big, bog, and bug.

The ________ qualifier to tar causes it to use xz compression when creating an archive.

--xz qualifier

What is the max/min compression

-9 max 1 min 0 no compression

Which optional parameter would you use with the Linux grep command in order to do a recursive search?

-E -R -c

You can type useradd ____ nemo as root to create the nemo account without creating a home directory for nemo.

-M

You want to copy a set of files but be prompted before cp overwrites any existing files. You would use the ___ option to cp to accomplish this goal.

-i

Which options to find can you use to locate files owned by a particular user? (Select all that apply.) -uid -name -id -user -u

-uid -user

To create a listing of the file afile.txt in the directory one level above the current one, you would type ls _________afile.txt.

../

Which of the following directories is where you would find the new mount point for removable media in the Linux OS?

/media /run

Which of the following directories stores package database information?

/var/lib

Where do log files reside on a Linux computer?

/var/log

what file holds general-purpose log entries?

/var/log/syslog

If a Linux system has no programs demanding CPU time what number would best represent the load average on that computer?

0

Which of the following UIDs denotes the root user?

0

root user UID

0

Which command would archive by compressing a file called "my-file" for a Debian based distro? A. tar trf my-file.tar B. tar tzf my-file.tar C. tar cf my-file.tar * D. tar xf Desktop/my-file.tar E. tar xfv my-file *

C. tar cf my-file *

Which keystrokes invoke the pico or nano search function? (choose two)

Ctrl + W F6

What keystrokes deletes a line of text when using nano?

Ctrl+K

Which keystrokes invoke the pico or nano search function? (Select all that apply.)

Ctrl+W F6

Which of the following redirection operators appends a program's standard output to an existing file, without overwriting that file's original contents? A.| B.2> C.&> D.> E.>>

E.>>

True or False: Network and telecommunications is not one of the jobs of a Linux system administrator

False

True or False: The Bash (Bourne-Again shell) is located in the /sbin/sh file

False

True or False: The Pipe operator | is used to connect the STDIN of one command to STDOUT of another

False

True or False: The files in /usr/apache2/sites-available/ define virtual hosts (sites)

False

True or False: The unofficial name for Perl is Practical expression and release language

False

True or False: The user ID (UID) is provided by the user at login

False

True or False: Ubuntu (and most Linux distros) uses csh as the default shell

False

True or False: Ubuntu and Kubuntu are the same except that Ubuntu uses he KDE Plasma Desktop while Kubuntu uses the Unity graphical environment?

False

True or False: Ubuntu is an ancient African word that means "freedom is for everyone" and "we are here because we are"

False

True or False: Vi is a powerful text that is not installed by default in the Ubuntu bash shell

False

True or False: Web servers process requests based on the HTTP (hypertext transmission protocol, which is based on Apache)

False

True or False: You need a package manager to download source code, compile, and install it.

False

True or false: Linux shares a common root with UNIX

False

You want to create a shortcut for the command cd ~/papers/trade. Which of the following lines, if entered in a bash startup script, will accomplish this goal? A. alias cdpt='cd ~/papers/trade' B. export cdpt='cd ~/papers/trade' C. cd ~/papers/trade D. shortcut cdpt "cd ~/papers/trade" E. env cdpt `cd ~/papers/trade`

A. alias cdpt='cd ~/papers/trade'

Which one of these is a console command that can be used to install any software available on Internet repositories or locally (CD/DVD ROM, file system, etc) of a Debian based system? A. apt-get B. ins-rem C. ist-rem D. dep-install E. ints

A. apt-get

Which of the following is a text-mode command that is helpful in identifying CPU information? A. cat /proc/cpuinfo B. lscpu C. lspci D. cfdisk E. uname -a

A. cat /proc/cpuinfo B. lscpu & E. uname -a

What commands might you use (along with appropriate options) to learn the value of a specific environment variable? (Select two.) A. env B. DISPLAY C. export D. echo E. cat

A. env D. echo

Which of the following commands, if typed in a bash shell, will create an environment variable called MYVAR with the contents mystuff that will be accessible to subsequently launched programs? A. export MYVAR='mystuff' B. MYVAR='mystuff' C. $MYVAR==mystuff D. echo $MYVAR mystuff E. setenv MYVAR mystuff

A. export MYVAR='mystuff' C. $MYVAR==mystuff

Which of the following are valid looping statements in bash shell scripting? (Select three.) A. for B. while C. goto D. until E. case

A. for B. while D. until

Which of the following programs produces a summary of the memory status of your computer, including the total memory available, the amount used, and the amount that's unused? A. free B. mem C. mf D. avail E. df

A. free

On which of the following CPU types does Linux run? (Select all that apply.)

All: a. x86 b. x86-64 c. Itanium d. PowerPC

Which optional parameter would you use with the Linux tar command to extract files from an archive? A. -x B. -d C. -A D. -c

A. -x

Which single keyboard character represents any single character except in a new line in a regular expression in Linux? A. . B ! C. $ D. #

A. .

Which Linux directory holds the system configuration files? A. /etc B. /bin C. /lib D. /usr E. /home

A. /etc

Which of the following directories stores package database information? A./var/lib B./usr/lib C./etc/lib D./tmp/lib

A. /var/lib

How many commands can you pipe together at once?

An arbitrary number

Which of the following lines identify valid shell scripts on a normally configured system? (Select two.) A. #!/bin/script B. #!/bin/bash C. !#/bin/tcsh D. #!/bin/sh E. !#/bin/zsh

B. #!/bin/bash C. !#/bin/tcsh

In the Perl syntax, what is the symbol that is used to precede a variable mane when the variable is a reference? A. % B. $ C. & D. @

B. $

What character is used is used in front of a variable name to reference the value of that variable? A. @ B. $ C. ^ D. # E. ?

B. $

Which two keyboard characters can denote an account with no password?

B. * D. !

Which Linux directory holds program files that are critical for normal operation and that ordinary users may run? A. /etc B. /bin C. /lib D. /usr E. /home

B. /bin

Which file can be used to check a DNS IP address? A. /cse/dns B. /etc/resolv.conf C. /etc/dns/resolve D. /etc/inet/confn

B. /etc/resolv.conf

You type mkdir one/two/three and receive an error message that reads, in part, No such file or directory. What can you do to overcome this problem?

Issue three separate mkdir commands: mkdir one, then mkdir one/two, and then mkdir one/two/three. (Your Answer)

Which of the following consists of supporting files for an application that are installed on a Linux computer?

Package

Which of the following type of user information might you find in the /etc/passwd file? (choose three)

Pick A C and E

Which of the following are the two major Linux package management systems?

RPM DPKG

Which of the following are the two major Linux package management systems?

RPM, DPKG

Which of the following would you use the yum command to install or upgrade applications? (choose all that apply)

Red Hat Fedora CentOS

Which of the following are considered RPM-based Linux distributions? (choose all that apply)

Red Hat Fedora CentOS SUSE Enterprise

&>

Redirects both standard output and standard error and overwrites the target file.

Which of the following actions does the find command perform?

Searching a file in a directory

After using a text editor to create a shell script, what step should you take before trying to use the script by typing its name?

Set one or more executable bits using chmod

After using a text editor to create a shell script, what step should you take before trying to use the script by typing its name?

Set one or more executable bits using chmod.

After using a text editor to create a shell script, what step should you take before trying to use the script by typing its name?

Set one or more executable bits using chmod. Copy the script to the /usr/bin/scripts directory. Run a virus checker on the script to be sure it contains no viruses. Next Mark For Review

What are the two types of FHS files found in the Filesystem Hierarchy Standard?

Standard & Variable

_____ files are those that control how the computer operates.

System

Which of the following results will be produced by specifying /bin/false to the shell for a user account in the /etc/passwd file?

The user will not be able to access the computer.

Linux supports two types of text-mode output to the screen, which you can send to separate files or display devices. True False

True

The regular expression Linu[^x].*lds matches the string Linus Torvalds. (T/F)

True

True or False: A Linux network user must belong to the primary group

True

True or False: A program can be executed to create a process

True

True or False: A shell command that waits for a given process to complete is the wait command

True

True or False: All files and programs can be accessed by the super user

True

True or False: Before a partition can be accessed, it needs to be formatted and mounted to the current directory structure

True

True or False: KSysguard is a system monitoring program for the KDE graphical desktop environment

True

True or False: One of the goals of the Linux file system is to make sure that the I/O port/connector device functions normally

True

True or False: Perl is a general purpose programming language that is installed on many of the Linux distributions

True

True or False: The Openbox GUI is a window manager without a desktop environment

True

True or False: The Synaptic Package Manager is a graphical package management program for apt with a GUI front-end

True

True or False: The X Window System is a protocol that defines how graphics are used

True

True or False: The nm-tool is a console utility that provides information about connections and devices

True

True or False: Use "inet" command to start other daemons as necessary

True

True or false: Including the file type code, symbolic links always have permissions of lrwxrwxrwx.

True

True or false: Many (not all) configuration files use a hash mark (#) to identify comment lines?

True

True or false: The regular expression Linu[&c.circ;x].*lds matches the string, Linux Torvalds.True or false: Linux stores information on groups in the /etc/groups file.

True

True or false: UNIX was originally developed by a group of AT&T employees at Bell labs

True

True or false: Valid looping statements in Bash include for, while, and until.

True

programs look up DNS info including host, nslookup, and

dig

The command that you use to read messages generated during the boot process and stored in the kernel ring buffer is the _____________ command.

dmesg

Which of the following statements would you need to include in a case statement to denote the end of the case statement?

easc

What command can you use to display prompts for a user in a shell script?

echo

Which command would you use to display prompts for a user in a shell script?

echo

Which of the following statements would you need to include in a case statement to denote the end of the case statement?

esac

what bash keyword terminates a case statement

esac

Your network's hardware interface is called eth0. You want to bring up this interface via DHCP, so you type dhclient _____ as root.

eth0

to bring up a network's hardware interface called eth0 via DHCP

eth0 as root

Once a shell script has been written, it must be made _____ in order to run it.

executable

What Bash scripting command can you use to control the return value generated by a script, independent of the other commands used in the script?

exit

You're writing a script that will be called by other scripts. You want to signal abnormal termination of your script by passing a value of 8 to the external script under some circumstances. What command can you use in your own script to do this?

exit 8

True or false: The following script launches three simultaneous instances of the terminal program. #!/bin/bash terminal terminal terminal

false

the host program is deprecated

false, always maintained

Which of the following commands will you use to find a pattern in a file?

grep

Which of the following Linux commands will print lines from the file world.txt that contain matches to changes and changed?

grep change[ds] world.txt

Which of the following commands will print lines from the file world.txt that contain matches to changes and changed?

grep change[ds] world.txt

you want to delete a group you type

groupdel

Which of the following Linux command line tool is used to extract a compressed file?

gunzip (not verified)

What is another name for a bash shell script that you might see?

hashpling

what option manually brings up a network interface in linux?

ifconfig

You want to store the standard output of the ifconfig command in a text file (file.txt) for future reference, and you want to wipe out any existing data in the file. You do not want to store standard error in this file. How can you accomplish these goals?

ifconfig > file.txt

Where does the kernel store its ring buffer logs?

in memory

What is the first process to be run by linux by the kernel?

init

When a program allocates more and more memory but doesn't use the memory, that is called what? (two words)

memory leak

You want to create a directory called ~/Documents/papers, but you're not sure that the ~/Documents directory exists. What command can you type to create the desired directory and its parent directory if it doesn't already exist?

mkdir -p ~/Documents/papers

tail -f afile.txt

monitors afile.txt for updates

Which of the following commands would you type to rename a file called newfile.txt to afile.txt?

mv newfile.txt afile.txt

what part of the user account's info is not stored in the /etc/passwd file?

password of account

You want to test connectivity to tranquility.luna.edu by sending 11 packets to see how many return. To do this, you can type

ping -c 11

You want to test connectivity to tranquility.luna.edu by sending 11 packets to see how many return. To do this, you can type __________ tranquility.luna.edu.

ping -c 11

$0

program name

An internet site that hosts software to install using yum,APT, or what similar tool?

repository

$2

second argument

dWhich of the following formatting commands can be used to replace a string in a file?

sed

Which of the following commands will change all occurrences of dog in the animals.txt file to mutt in the screen display?

sed 's/dog/mutt/g' animals.txt

Using the image below, which Linux command line tool would give you this list in an alphabetic order?

sort

You can type ______ to acquire root privileges that persist across multiple commands.

su

typing in su -? command to issue a single command root privileges?

su -c

You want to run the following command inside your Linux terminal: iptables -L but know you will need to have root access to do so. If you are logged in under a basic user account, which command could you add to give you root access for just this command?

su iptables -L sudo iptables -L Next Mark For Review

Which methods or commands provide access to superuser privileges for authorized users? a. Logging into the root account b. The su command c. The switch_user command d. The sudo command Correct e. The hash (#) symbol

su,sudo

what command allows superprivleges

sudo

You want to run the command cat /etc/shadow as root, but you're logged in as an ordinary user. Which of the following commands will do the job, assuming that the system is configured to give you root access via the appropriate command?

sudo cat /etc/shadow

You want to run the command iptables -L as root, but you are logged in as a mortal user. Which of the following commands will do the job, assuming the system is configured to give you root access via the appropriate command? sudo iptables -L root iptables -L passwd iptables -L su iptables -L admin iptables -L

sudo iptables -L

General system messages are likely to be found in /var/log/messages or /var/log/__________ , depending on your distribution.

syslog

To display the last few lines of a text file, you would type _____ afile.txt.

tail

What program would you use to display the end of a configuration file?

tail

to display the last twenty lines of the text file, "afile.txt", you would type

tail afile.txt

output the last 100 lines of afile.txt

tail afile.txt -n 100

Which of the following Linux command line tools supports both gzip and bzip2 compression?

tar

Which of the following command line tools would be the best to use when compressing more than two files inside a Linux system?

tar

Which of the following syntaxes will you use to extract a file using the tar command?

tar -zxvf {.tgz-file}

Which compression file format can be used across multiple operating systems (Linux, Windows, Mac OS)

tar file xz file zip file Next Mark For Review

You've received a tar archive called data79.tar from a colleague, but you want to check the names of the files it contains before extracting them. Which of the following commands would you use to do this?

tar tvf data79.tar

Do GUI tools for accounts provide more options than their text-mode counterparts?

text mode tools provide just as much options

$1

the first argument

The file stuff.txt does not exist. You type nano stuff.txt and press Enter. What happens next?

the nano text editor starts and displays the message New File in the status bar.

|

ties a program's standard output to another's standard input

ps allows you to do what?

to view the process table

If you are a Linux system's administrator and wanted to locate any programs that are consuming large amounts of the CPU or memory, what command line tool would help assist you with this?

top

Which of the following commands lists a dynamic view of running processes?

top

If you are a Linux system's administrator and wanted to locate any programs that are consuming large amounts of the CPU or memory, what command line tool would help assist you with this?

top load

What tools can you use to identify running processes?

top, ps

Which of the following commands would you type to rename a file called newfile.txt to afile.txt?

touch newfile.txt afile.txt ln newfile.txt afile.txt mv newfile.txt afile.txt Submit my answers

A valid zip file

trip.zip name

Setting the SUID bit on a program file that's owned by root causes it to execute with root privileges no matter who runs it.

true

True or False: RPM and Debian packages specify if they need other packages installed

true

True or False: is nano an extended variant of pico?

true

True or false: A file with permissions of crw-rw-r-- is a character device file.

true

True or false: Using chmod, you can add world execute permission to a file without modifying any of the file's other permissions.

true

True or false: With most distributions, USB flash drives, and other removable media appear in subdirectories of /media.

true

administrators use lower than 500 UID

true

chmod can add world execute permission to a file without modifying any permissions?

true

Default permissions are determined by the _____.

umask

default permissions are determined by

umask

A text-mode program, verbose, prints a lot of bogus "error" messages to standard error. How might you get rid of those messages while still interacting with the program?

verbose 2> /dev/null

an improved version of vi?

vim

If you were a Linux system's administrator and wanted to see who is currently logged into the computer and what programs they are currently running, you can type the ____ command.

w

What command counts the characters,words, and lines in a text file?

wc

Which of the following commands will install the GIMP software application on an RPM-based Linux OS?

yum install gimp

If you were doing a regular expression inside a Linux command line, which special character on the keyboard would give you two possible matches using the example below: car ____ truck

|

Which of the following keyboard strokes would you use to connect two or more commands in Linux?

|

True or false: Users should be logged in when you change their UID numbers with usermod.

False If a user is logged in when you change the user's UID number, problems can ensue because the login session will continue to use the old UID number. Thus, users should be logged out before you attempt to change their UID numbers.

True or false: Linux lacks support for USB printers, so you must use a parallel or Ethernet printer with Linux.

False Linux supports a wide variety of USB printers (although you should check on support for specific models before buying).

True or false: If you want to create a link to a directory, you must use a hard link.

False Most filesystems disallow hard links to directories, and mv won't let ordinary users create one even if the filesystem supports this feature. Soft (also known as symbolic) links, on the other hand, can point to directories, and ordinary users can create such links. Thus, the statement in the question is false; you must use a soft link, not a hard link, when linking to a directory.

True or false: All Linux Web browsers are GUI programs.

False The Lynx Web browser is text-mode; you can run it in a terminal window or from a text-mode login.

True or false: The Secure Shell program is a command interpreter that keeps no history of its actions for others to discover, hence its name.

False The Secure Shell (SSH) is a remote-access protocol and associated client and server programs. It enables you to log into your computer remotely using encryption to enhance security compared to older unencrypted remote login tools.

True or false: The gzip program generally produces more compact compressed files than does the bzip2 program.

False The bzip2 program usually produces compression that's superior to gzip's. Both programs are surpassed by xz.

True or False: Linux stores information on its groups in the /etc/groups file.

False The file it stores groups in is the /etc/group file not /etc/groups.

ASCII is limited to how many characters?

128

ASCII supports _____ unique characters (not including control characters).

128

ASCII supports _____ unique characters.

128

to append a program's standard error to an existing file without deleting its contents, you use what operator?

2>>

Which character that represents the start of a line in a regular expression? A.| B.% C.& D.^

D. ^

Which of the following actions is performed when a file is uncompressed?

Extract

Which keystroke invokes the pico or nano search function?

F6

True or false: WEP provides the highest available level of Wi-Fi security

False: WEP is in fact the worst of the three common levels of Wi-Fi security. WPA2 is the best, with WPA in-between.

True or false: The host program has been deprecated.

False: The host program is actively maintained; it's nslookup that has been deprecated.

Using the image below, what does the yellow dot best represent?

Files

How would you remove two lines of text from a file using the Vi text editor?

In command mode, position the cursor on the first line and type 2dd.

Which command would reveal the total RAM statistics about your Linux system?

Mem

Do all bash scripts have to contain functions?

No

You want to copy a directory, MyFiles, to a USB flash drive that uses the FAT filesystem. The contents of MyFiles are as follows: The USB flash drive is mounted at /media/usb, and so you type cp -a MyFiles/ /media/usb. What problem will occur when you attempt to copy these files? $ Is -I MyFiles/ total 276

One file will be missing on the USB flash drive.

You type echo $PROC, and the computer replies Go away. What does this mean?

One of your configuration files, or a program you've run, has set the $PROC environment variable to Go away.

When should you use the root account? When you need extra computational speed Only when you're the sole user of the computer When you need to diagnose a problem with the computer Only when running untrusted programs. Only when necessary to perform administrative tasks

Only when necessary to preform admininstrative tasks

Which of the following is NOT considered a Debian based Linux distribution?

OpenSUSE

Parentheses

Ordinary parentheses (()) surround subexpressions. Parentheses are often used to specify how operators are to be applied; for example, you can put parentheses around a group of words that are concatenated with the vertical bar, to ensure that the words are treated as a group, any one of which may match, without involving surrounding parts of the regular expression.

Which of the following type of user information might you find in the /etc/passwd file? (choose three)

The UID The user's account home directory The path to the user's default text-mode shell

Which of the following type of user information might you find in the /etc/passwd file? (choose three)

The UID The user's account home directory The path to the user's default text-mode shell

Which of the following pieces of information on user accounts is not normally stored in the /etc/passwd file on modern Linux distributions? The account's default shell The account's default GID number The account's UID number The account's username The account's password

The account's password

Start and End of Line

The carat (^) represents the start of a line, and the dollar sign ($) denotes the end of a line.

Any Single Character

The dot (.) represents any single character except a newline. For instance, a.z matches a2z, abz, aQz, or any other three-character string that begins with a and ends with z.

B, E. The F6 and Ctrl+W keystrokes both invoke the search function, so options B and E are correct. The F3 key writes the current buffer to disk, so option A is incorrect. The Esc+S keystroke is an obscure one; it enables or disables smooth scrolling, so option C is incorrect. Ctrl+F moves forward one character, so option D is incorrect.

Which keystrokes invoke the pico or nano search function? (Select all that apply.) A) F3 B) F6 C) Esc-S D) Ctrl+F E) Ctrl+W

Which options to find can you use to locate files owned by a particular user? (Select all that apply.)

a. -uid d. -user The -uid option to find locates files owned by a user with the specified user ID (UID) number, and the -user option locates files based on the user's username. Thus, options A and D are both correct. The -name option locates files with a specified filename, so option B is incorrect. The -id and -u options are both fictitious, so options C and E are incorrect.

>>

appends standard output to a file

Which of the following tools is best suited to installing a software package and all of its dependencies on a Debian computer?

apt-get

The gzip, bzip2, and xz programs all perform _____ compression, in which the decompressed data exactly matches the original pre-compression data.

lossless

The gzip, bzip2, and xz programs all perform _________ compression, in which the uncompressed data exactly matches the original precompression data.

lossless

To have a script send an email automatically, which command would you use to do this?

mail


Related study sets

A&P Online Exam #2 prep questions

View Set

Ch 1-9 & ch 12 practice question

View Set

Chapters 15 & 16 - Bloodflow and Blood Pressure

View Set

AWS Cloud Practitioner Practice questions

View Set

Traducción profesional y académica Estudios Ingleses UNED- vocabulary Birth Certificate, Uni Degree, Student transcript and will

View Set