Chapter 5 Flashcards
A Linux command line, or blank as it’s properly called, is a program.
shell
You can start a shell in a GUI window called a blank, or you can log into the computer locally via a text-mode console.
terminal program
The default shell in most Linux distribution is the blank.
Bourne Again Shell (bash)
Linux supports blank which are virtual screens that can hold various types of information - textual or graphical
virtual terminals (VT)
How can you switch between VTS?
Ctrl+Alt+Fn(FN key for VT number)
How do you terminate your text-mode session?
Type exit or logout
Blank is the name of the command used to run the program
COMMAND-NAME
Blank are additional items added to modify the command’s behavior
[OPTION]s
Blank is an item you pass to the command to let the program know you want to operate on that item.
[ARGUMENT]
The blank program displays which users are currently on the system
who
What is the command to show when the program was started?
who -b
What command is short for concatenate and accepts arguments?
cat
What command is used to display the contents of MyFile.txt?
cat MyFile.txt
What command adds line numbers and displays contents of MyFile.txt?
cat -b MyFile.txt
What command allows you to learn command usage details?
man
What is the command to learn about the cat command?
man cat
What command displays information on the computer’s use of memory?
free
What command will result in a common-delimited set of directory names, which the shell searches in sequence whenever you type a command that it doesn’t handle directly
echo $PATH
How can you run a program that is not in one of the PATH directories?
By typing the program’s directory location along with its name
When you run an executable program. that is not located in the PATH, it is called blank outside the defined path.
invoking a command
If you would like to determine how an executable program would be handled, what command would you type, which will show you the program’s directory location?
type [executable_program_name]
type free
When you launch a GUI program from the terminal window, the GUI program opens its own window and the terminal program becomes blank.
unresponsive
What keystroke allows you to suspend a GUI program run from the terminal to allow you to run more commands in the terminal?
Ctrl+Z
After you suspend a program, if you want both to run the GUI program and use the terminal from which you launched it, you can type blank in the terminal and both programs will be active.
bg
If you want to wake a sleeping GUI program, but you don’t need the terminal window to be active, what do you type?
fg
What command do you type to run firefox in the background
firefox&
Blank is way to enter a long command name or filename with few keystrokes
Command completion
After you type part of the command name or file name, what key do you press for command completion?
tab
What keystroke allows you to move through previously typed commands?
up arrow
What keystroke retrieves an earlier entry bypassed when using the up arrow?
down arrow
What keystroke moves the cursor left one character?
left arrow
What keystroke moves the arrow right one character?
right arrow
What keystroke moves the cursor to the start of the line?
Ctrl+A
What keystroke moves the cursor to the end of the line?
Ctrl+E
What keystroke deletes the character under the cursor?
delete
What keystroke deletes the character to the left of the cursor?
backspace
What keystroke swaps the character under the cursor with the one to the left of the cursor?
Ctrl+T
What keystroke launches a full-fledged editor on the current command line?
Ctrl+X and then Ctrl+E
What keystroke searches for a command after typing a few characters?
Ctrl+R
What command do you type to view all of the commands in your history, which allows you to limit the result by typing a number following the command
history
Blank describe not only programs, but also configuration files and other features of a Linux installation
manual pages
Manual pages are not blank in nature, but are meant to be a quick reference guide.
tutorial
What is the man page section number for executable programs and shell commands?
1
What is the man page section number for system calls by the kernel?
2
What is the man page section number for library calls by program libraries?
3
What is the man page section number for device files (usually stored in /dev)
4
What is the man page section number for file formats?
5
What is the man page section number for games?
6
What is the man page section number for miscellaneous (metro packages, conventions, and so on)
7
What is the man page section number for system administration commands (programs run mostly or exclusively by root)?
8
What is the man page section number for kernel routines?
9
How can you override man command default search behavior?
By pasing a section number before the keyword
The blank command searches summary information contained in the man page for the keyword you specify
whatis
The blank command performs a thorough search of both the Name and Description sections of the man pages
apropos
What response with the whatis or apropos command indicates that you typically need to change the keyword you are using
nothing appropriate
You can update the man database manually by using superprivileges and typing the blank command for older Linux distributions or blank otherwise
makewhatis
mandb
Name 9 of the common sections found in manual pages
Name
Synopsis
Description
Options
Files
See Also
Bugs
History
Author
Linux’s man system uses a program called blank to display information. This program is a pager, which displays text file one screen(one page) at a time.
less
What keystroke displays help on using less?
H
What (5) keystrokes move down one screen in the document using less?
Page down, spacebar, Ctrl+V, F, or Ctrl+F
What 4 keystrokes move up one screen using less?
Page up, Esc+V, B, Ctrl+B
The man page system is typical on Unix-like systems, but it is also old and quite limited. A newer documentation system called blank is also available.
info pages
Man pages are not blank while info pages are
hyperlinked
Each info pages is known as a blank
node
Info pages (nodes) are organized on blank
levels
To access info pages what command do you type?
info [command]
What keystrokes exits the man page less command?
Q, :Q, or ZZ
What keystroke displays help information in the info pages
?
What keystroke moves to the next node in the info pages
N
What keystroke moves back in a series of nodes in the info pages
P
What keystroke allows you to move to the node that is highlighted in the info pages
Enter
What keystroke moves up or down the page of the current node in the info pages
Page up, Page down
What keystroke exits the info pages
Q
The Linux blank command searches a database of filenames that Linux maintains in order to find additional program documentation.
locate
What keystroke moves the cursor to the start of the line when typing a command in bash?
Ctrl+A
How can you run a program in the background when launching it from a shell? (choose all that apply)
A. Launch the program with the start command, where command is the command you want to run.
B. Launch the prorgram by typing bg command
C. Append the apersand after the command name
D. Launch the programs normally, press CTRL+Z in the shell and then type bg in the shell
E. Launch the programs normally, press CTRL+Z in the shell and then type fg in the shell
C, D
What command is an improved version of more?
less
True or False: Pressing Alt+F3 in the GUI brings up a text-mode display that you can use to log into Linux
False
True or False: You can force man to display a man page in a specific section of the manual by preceding the search name with the section number
True
True or False: Linux documentation in the /usr/share/doc directory tree is almost always in OpenDocument text format
False
Type logout or blank to end a text-mode terminal session
exit
Each document in an info page is known as a blank
node
The blank command searches a database of filenames, enabling you to identify files quickly whose names match a term that you specify
locate