Mastering the CLI Flashcards
What are the advantages of a CLI when compared to a GUI?
- Faster
- Uses less system resources
- Is more consistent and predictable update-to-update than a GUI
- Flexible and Powerful
What is the Anatomy of a CLI line?
- Prompt: Shows current directory or Branch Name
- Command: Instructions
- Option/Flag: Indicated by a
-
; optional and they customize the output/operation of the command - Argument: A data set that the command works on/with; some commands support multiple arguments, seperated by a space
- Cursor: Shows current position of user interaction
What does the command echo
do?
prints argument to the screen
What does the shortcut CTLR+c
do?
Kills any command that is currently running, and starts a new line
What does the shortcut CTLR+a
do?
Moves cursor to the beginning of the line
What does the shortcut CTLR+e
do?
Moves cursor to the end of the line
What does the shortcut CTLR+u
do?
Clears the current line
What does the shortcut CTLR+l
do?
Clears the terminal window (but does not clear history)
What does the shortcut Up Arrow
do?
Copies the previous command to the line
What does the shortcut Down Arrow
do?
Copies the next command to the line
What does the command ls
do?
Lists the contents of the working directory
What does the command ls -a
do?
Lists the contents of the working directory w/ hidden files
What is the argument in ls
?
A path
What does the command man
do?
Opens a ‘manual’ for the argument, which is a command
What directory (in a UNIX filesystem) contains basic commands and programs needed to achieve minimal working environment?
/bin (/sbin)