Module 2 Flashcards
Section 1
User commands
Both executable & shell programs
Section 2
System calls
Kernel routines that are invoked from user space
Section 3
Library functions
Provided by program libraries
Section 4
Special files
Such as device files
Section 5
File formats
For many configuration files & structures
Section 6
Game & screensavers
Historical section for amusing programs
Section 7
Conventions, standards, & miscellaneous
Protocols & file systems
Section 8
System administration & privileges commands
Maintenance tasks
Section 9
Linux kernel API
Internal kernel cells
Spacebar
Scroll forward (down) one screen
PageDown
Scroll forward one screen
PageUp
Scroll backward (up) one screen
DownArrow
Scroll forward one line
UpArrow
Scroll backward one line
D
Scroll forward one half-screen
U
Scroll backward one half-screen
/string
Search forward for “string” in the man page
N
Repeat previous search forward in the man page
Shift+N
Repeat previous search backward in the man page
G
Go to the start of the man page
Shift+G
Go to the end of the man page
Q
Exit man & return to the command shell prompt
man
Allows users to view the reference manual of a command or utility run in the terminal
less
Terminal pager program used to view the contents of a text file one screen at a time
tee
Used w/ a pipe, reads standard input, then writes the output of a program to standard output & simultaneously copies it into the specified file or files
Copies its standard input to its standard output & also redirects its standard output to the files that are given as arguments to the command
set
Lists all shell variables that are currently set
export
Can assign any variable that is defined in the shell as an environment variable by marking it for export
Displays all exported variables
unalias
Unsets an alias
Standard Input
Channel 0
Reads input from the keyboard
stdin
Standard Output
Channel 1
Sends normal output to the terminal
stdout
Standard Error
Channel 2
Sends error message to the terminal
stderr
> file
Redirect stdout to overwite a file
> > file
Redirect stdout to append a file
2>file
Redirects stderr to overwrite a file
2>/dev/null
Discard stderr error messages by redirecting them to /dev/null
> file 2>&1
Redirect stdout & stderr to overwrite the same file
Same as: &>file
&>file
Redirect stdout & stderr to overwrite the same file
Same as: > file 2>&1
> > file 2>&1
Redirect stdout & stderr to append to the same file
Same as: &» file
&» file
Redirect stdout & stderr to append to the same file
Same as:»_space; file 2>&1
Vim - “u” key
Undoes the most recent edit
Vim - “x” key
Deletes a single character
Vim - “:w” command
Writes (saves) the file & remains in command mode for more editing
Vim - “:wq” command
Writes (saves) the file & quits Vim
Vim - “:q!” command
Quits Vim, & discards all file changes since the last write
Insert Mode
“i”
All typed of text becomes file content
Visual Mode
“v”
Multiple characters may be selected for text manipulation
Extended Command Mode
”:”
Perform tasks such as writing the file (to save it) & quitting the Vim editor
Command Mode
Used for navigation & text manipulation