1/96
Looks like no tags are added yet.
Bash is: A) a networking term | B) a shell | C) an operating system | D) a website
B. a shell
The two login types are: A) URI and CLU | B) CLI and GUI | C) GUX and CLI | D) URI and CLI
B. CLI and GUI
A software release cycle describes: A) How often the computer must be upgraded to support new software | B) How often the computer must be rebooted | C) How often upgrades come out to software | D) The often security fixes are implemented | E) How often the software’s memory is released back to the operating system
C. How often upgrades come out to software
Which Linux distributions are derived from Red Hat? A) CentOS | B) Slackware | C) Ubuntu | D) Debian | E) Fedora
A. CentOS; E. Fedora
Bundling utilities, management tools, and application software with a Linux kernel is called a: A) A trademark | B) A text editor | C) A type of hardware | D) A distribution of Linux
D. A distribution of Linux
To display your current location within the filesystem, you can type: A) cwd | B) pwd | C) dir | D) whereami
B. pwd
A command can take the form of: A) A configuration file | B) A block | C) A program built-in to the shell | D) An alias | E) A function | F) A variable
C. A program built-in to the shell; D. An alias; E. A function
You want to execute the ls command with two options: -r and -l. Which of the following are valid ways to run this command: A) ls -r -l | B) ls rl | C) rl ls | D) ls -l -r | E) ls --r --l | F) ls -rl
A. ls -r -l; D. ls -l -r; F. ls -rl
You can pass arguments to long options by using which of the following techniques: A) –option~argument | B) –option argument | C) –option=argument | D) –option{argument}
B. –option argument; C. –option=argument
When typing a command, you can have the bash shell complete the command by pressing which key? A) The Enter key | B) The Del key | C) The Backspace key | D) The Tab key | E) The Up Arrow key
D. The Tab key
Long command options are preceded by which two characters? A) | B) -- | C) || | D) &&
B. --
Which command is used in order to view the manual page for a topic? A) -m | B) -x | C) show | D) doc | E) man
E. man
The ______ command will display your current working directory. A) exit | B) uname | C) pwd | D) exec
C. pwd
To see a list of commands that are available while viewing a man page, you can type the __ character. A) c | B) g | C) w | D) h
D. h
Environment variables are: A) Not used by shells at all | B) Are not a valid type of variable | C) Only available to the shell they are created in | D) Passed into other shells and commands
D. Passed into other shells and commands
If you want to delete a variable, you can run: A) wipe | B) unset | C) clear | D) delete
B. unset
Local variables are: A) Not used by shells at all | B) Are not a valid type of variable | C) Passed into other shells and commands | D) Only available to the shell they are created in
D. Only available to the shell they are created in
Shell variables are used to: A) Hold critical system information | B) Hide passwords | C) Prevent users from logging in | D) Reboot the system
A. Hold critical system information
The /bin directory contains: A) Nothing; it is not a valid directory | B) Essential administrative commands | C) The most fundamental commands that are essential for the operating system to function | D) Commands that have been compiled from local sources
C. The most fundamental commands that are essential for the operating system to function
The /sbin directory contains: A) Nothing; it is not a valid directory | B) Commands that have been compiled from local sources | C) Essential administrative commands | D) The most fundamental commands that are essential
C. Essential administrative commands
To view all current variables, you can use: A) var | B) view | C) dump | D) set
D. set
Which file can you place in your home directory to be executed when you log off the system? A) /etc/bashrc | B) ~/.bash_profile | C) ~/.bash_logout | D) ~/.bashrc
C. ~/.bash_logout
Which of the following files is for all bash shell users and executed every time a bash shell is opened? A) ~/.bashrc | B) /etc/bashrc | C) /etc/profile | D) ~/.bash_profile
B. /etc/bashrc
Which of the following files is for all bash shell users and executed only at login? A) /etc/bashrc | B) /etc/profile | C) ~/.bashrc | D) ~/.bash_profile
B. /etc/profile
Which of the following will create a variable? A) variable~value | B) variable value | C) variable=value | D) variable+value
C. variable=value
Which of the following is not used for globbing? A) | B) ? | C) # | D) [ ]
C. #
Which command will display more information about globbing? A) man globbing | B) man 7 globbing | C) man 7 glob | D) man -7 glob
C. man 7 glob
The glob pattern [a-d] would match: A) All files | B) A file name with a single character that is either an a, -, or d. | C) A file name with a single character that is either a a, b, c, or d. | D) Nothing, this is an invalid glob pattern.
C. A file name with a single character that is either a a, b, c, or d.
Use the ___ option to display hidden files with the ls command. A) -h | B) -a | C) -D
B. -a
The ls command can list the contents of only one directory at a time. A) True | B) False
B. False
The period . character in the output of the ls command represents: A) Hidden files | B) The end of the command output | C) The current directory | D) Directories that can’t be accessed
C. The current directory
To perform a long listing to show file details, use which of the following commands: A) ls -l | B) ll | C) ls -L | D) ls -D
A. ls -l
To copy the contents of a directory, use the following option(s) for the cp command: A) -r | B) -A | C) -R | D) -d
A. -r; C. -R
The mv command can be used to move more than one file at a time. A) True | B) False
A. True
The mv command will rename a file when a new directory is not specified. A) True | B) False
A. True
The rmdir command can be used to delete directories and their contents. A) True | B) False
B. False
Which character at the beginning of a long listing indicates a directory? A) d | B) c | C) l | D) –
A. d
Which of the following are advantages of using the find command? A) It is quicker than the locate command | B) Its results are always the most up-to-date | C) It pages the results | D) It can search by file attribute types
B. Its results are always the most up-to-date; D. It can search by file attribute types
The FHS sets which standard? A) Which filesystem types should be used | B) Which partitions should be created | C) Which directories should be used to hold specific files | D) Which services should be installed
C. Which directories should be used to hold specific files
What directory is used as a temporary mount point? A) /tmpmnt | B) /xbin | C) /mnt | D) /etc
C. /mnt
Which option to the find command will search by user owner? A) -uowner | B) -owner | C) -user | D) -person
C. -user
Which directory represents the root of the filesystem hierarchy? A) /etc | B) /var | C) / | D) /root
C. /
Which directory is used to store user home directories? A) /home | B) /usr | C) /homedir | D) /tmp
A. /home
Which directory is used for the home directory of the root user? A) / | B) /root | C) /var | D) /home
B. /root
If you want to see the entire contents of a text file, you can use the _____ command: A) type | B) cat | C) wc | D) cut
B. cat
The head -n -1 readme.txt command will: A) Display all but the first line of readme.txt | B) Number the first line of readme.txt | C) Display the first line of readme.txt | D) Display all but the last line of readme.txt
D. Display all but the last line of readme.txt
Which command will merge two files together line by line? A) join | B) merge | C) combo | D) paste
D. paste
If you want to break apart a large file into smaller files, you can use: A) dump | B) split | C) cat | D) break
B. split
If you want a file to be displayed with its lines numbered, you can use: A) nc | B) nl | C) fmt | D) cut
B. nl
Which of the following commands can be used to scroll through a text file? A) head | B) sed | C) less | D) cat
C. less
The regular expression a is equivalent to: A) a{0,} | B) a{1} | C) a{0,1} | D) a{1,}
A. a{0,}
To use extended regular expressions, you can use: A) grep -e | B) egrep | C) grep -E | D) fgrep
B. egrep; C. grep -E
What does the vertical bar | character do in a regular expression? A) Redirects input to the command | B) Redirects output from the command | C) Separates alternative patterns that can be matches | D) Separates repetition modifiers
C. Separates alternative patterns that can be matches
What is not a purpose of using parentheses around parts of a regular expression? A) They can be used to make alternation more efficient | B) They can be used to refer back to what was matched | C) They can be used to change the order that the pattern is evaluating | D) They can be used to group characters for repetition
C. They can be used to change the order that the pattern is evaluating
Which of the following regular expression characters is an extended regular expression character? A) . | B) + | C) $ | D) \
B. +
Which regular expression character matches any one character? A) + | B) \ | C) . | D) ?
C. .
If you are in the vi command mode and want to begin inserting text before your cursor, you can type: A) O | B) i | C) A | D) o
B. i
If you are in vi command mode and want to add a new line after your cursor, you can type: A) O | B) i | C) o | D) a
C. o
If you want to move a character to the right in vi command mode, you can press the Right Arrow Key → or: A) k | B) l | C) j | D) h
B. l
To go to the first line of a vi document in command mode, you can type: A) 1G | B) G | C) gg | D) GG
A. 1G; C. gg
To perform cut and paste in a vi document, you actually do: A) delete and put | B) yank and put | C) delete and yank | D) yank and paste
A. delete and put
To save and then quit, you can type in command mode: A) WW | B) ZZ | C) QQ | D) !!
B. ZZ
If you want to append content to a file with the normal output of a command, you can use: A) 1> | B) > | C) >> | D) 2>>
C. >>
This stream is the output of a command operating normally: A) stdout | B) stdin | C) stdnorm | D) stderr
A. stdout
Two or more commands combined with the vertical bar | character between them form a: A) pipeline | B) streamline | C) outputline | D) command line
A. pipeline
Which command can be used to send the output of a command to both stdout and a file: A) ls | tee /tmp/output.txt | B) ls 2 | /tmp/output | C) ls | echo /tmp/output.txt | D) ls | /tmp/output.txt
A. ls | tee /tmp/output.txt
A popular program for monitoring running processes in real-time is: A) top | B) ghost | C) mon | D) watcher
A. top
The uptime command prints a statistic representing the system load over what three time spans? A) Last ten minutes | B) Last five minutes | C) Last minute | D) Last fifteen minutes | E) Last hour | F) Last thirty minutes
B. Last five minutes; C. Last minute; D. Last fifteen minutes
The _____ command will list the commands that are running in your terminal. A) proc | B) ps | C) ls | D) list
B. ps
The key press combination that will request a process to stop is: A) CTRL+C | B) CTRL+P | C) CTRL+Z | D) CTRL+D
A. CTRL+C
To change the niceness value of an existing process, you can use the _____ command. A) renice | B) reset | C) set | D) nice
A. renice
To execute a command with the default priority, which value do you pass to the nice command? A) 19 | B) 20 | C) -20 | D) 0
D. 0
To see how long the system has been running, you can use the _____ command. A) nice | B) free | C) uptime | D) ps
C. uptime
To see the list of background processes that you have started in your shell, you can run: A) process | B) jobs | C) list | D) work
B. jobs
To send a signal to a set of processes with the same name, you can run: A) sigkill | B) allkill | C) grpkill | D) killall
D. killall
To view statistics on memory availability, you can use: A) free | B) mem | C) stat | D) uname
A. free
Using the kill command always terminates processes. A) True | B) False
B. False
By default, tar will attempt to extract an archive… A) to the specified directory. | B) into the archive’s parent directory. | C) into the working directory. | D) into the user’s home directory.
C. into the working directory.
The dd command can be used to copy entire partitions. A) False | B) True
B. True
To decompress the archive example.gz, use the following command: A) gzip -u example.gz | B) gunzip -x example.gz | C) gzip -x example.gz | D) gunzip example.gz
D. gunzip example.gz
Which of the following commands could be used to extract the archive, example.tar? A) tar -uz example.tar | B) tar -uf example.tar | C) tar -xf example.tar | D) tar -xz example.tar
C. tar -xf example.tar
Which option to the zip command will list its files without uncompressing them? A) -l | B) -d | C) -R | D) -r
A. -l
For the rwxr-x--x permission set, the highlighted permissions belong to: A) The user owner of the file | B) All users besides the user owner and group owner | C) The user owner and group owner of the file | D) The group owner of the file | E) Cannot determine from supplied text: the highlighted portion of the permission string is not visible.
Cannot determine from supplied text: the highlighted portion of the permission string is not visible.
The command, chmod u=g will: A) Set the user owners permissions to match the group owners permission | B) Set the group owners permissions to match the user owners permissions | C) Set the user owners permissions to rwx | D) Nothing, the command syntax is invalid
A. Set the user owners permissions to match the group owners permission
The group ownership of a file may only be changed by: A) Any user can change the group ownership of any file | B) The root user | C) The owner of the file | D) Both the root user and the owner of the file
D. Both the root user and the owner of the file
The only person who can change the user ownership of a file is: A) The root user | B) Any user can change the group ownership of any file | C) The owner of the file | D) Both the root user and owner of the file
A. The root user
The setuid permission on a file: A) Causes the file to run under the owner’s identity | B) Causes the file to never run as root | C) Causes the file to run under the user’s identity | D) Causes the file to always run as root
A. Causes the file to run under the owner’s identity
To run a script file, you need both read and execute permission. A) True | B) False
A. True
Which command can be used to set what your default permissions will be on new files? A) mode | B) umode | C) umask | D) mask
C. umask
Which command can change the user owner of a file? A) own | B) chown | C) pawn | D) chpawn
B. chown
Which command is used to change permissions on a file? A) chmod | B) chperm | C) chgperm | D) chgmode
A. chmod
Which commands can be used to change the ownership of a file? A) chown | B) chgrp | C) chggrp | D) newgrp
A. chown; B. chgrp
Which command will allow you to change the group ownership of a file that you own? A) chgrp | B) regroup | C) chmod | D) chown
A. chgrp
Which permission, when set on a directory, causes new files and directories that are created inside to be owned by the group that owns the directory? A) write | B) setgid | C) setuid | D) sticky bit
B. setgid
What permissions are typically placed on soft link files? A) rw-rw-rw- | B) --------- | C) rwxrwxrwx | D) rwx------
C. rwxrwxrwx
Which are valid link types in Linux? A) Stable links | B) Hard links | C) Filesystem links | D) Soft links
B. Hard links; D. Soft links
Which type of link can be made to directories, hard or soft? A) soft | B) hard
A. soft