Command Line Interface/General Info (I) Flashcards
What are two ways to control/command a computer?
1-GUI (mouse/click/tap/icons)
2-the Command Line Interface
What is the main purpose of the command line?
To manipulate a computer’s files, directories and programs (move, rename, execute, copy, etc.)
What is the most common OS for servers?
Linux (Mac OS and Unix are similar to it)
What are the prompt icons for the Bash shell and the Zsh shell?
Bash = $
Zsh = %
When you are logged in as the admin user (“root”), what is the prompt icon?
This same icon is also used for what?
#
Comments
What is the main reason to learn how to use the command line?
To do system admin tasks such as installing software, compiling/running code, debugging server issues, managing system logs, and restarting servers
What is “rubber duck debugging?”
When you have coding errors, it is the technique of explaining your code aloud line-by-line to a rubber duck, with the idea that doing so will allow you to hopefully come across a solution.
An interface allows you to control a computer. What are the two main parts of an interface?
1-a display of info about what the computer is doing
2-a way to tell the computer what to do
Here is a prompt:
scottjones@Scotts-Air ~ %
Identify each part of the prompt:
scottjones. = ? Scotts-Air = ? ~ = ?
scottjones = the user/the person who is logged into the command line interface
Scotts-Air = the host/the name of the computer
~ = this space shows your current directory (in this example, it’s the home directory)
What are the four items that make up the CLI display?
1-the p______
2-the c______
3-the i______
4-the o_______
1-the prompt
2-the cursor
3-the input
4-the output
True or false?
A command can be a path to a file.
True
What are arguments/strings?
Pieces of info passed to a command.
Are arguments always need for a commands?
No.
What is a flag? Where are they placed after a command?
A special type of argument. They are usually placed before the other arguments.
What do flags look like? (there are two types)
abbreviated flags/one dash:
-s, -z, c, etc.
(These can be combined: -c, -s, -z = -csz )
full-word flags/two dashes:
- -format, etc.