Command Line - brightstudent/backend GitHub Wiki
Command Line Interface
A command-line interface (CLI) is a text-based user interface (UI) used to run programs, manage computer files and interact with the computer. Command-line interfaces are also called command-line user interfaces, console user interfaces and character user interfaces. CLIs accept as input commands that are entered by keyboard; the commands invoked at the command prompt are then run by the computer.
Why do we use it
During this course we will be using the CLI to establish a connection with GitHub. This enables us to clone a repository and work on it locally. Any changes made to the repository can also be pushed to GitHub using the CLI.
Although these tasks can be completed using the GUI, it's slightly faster and easier using the CLI. Especially since you can access the terminal straight from visual studio code.
What's the difference between a command line and a terminal?
These two names are frequently used interchangeably. A terminal is a piece of software that launches and connects to a shell. Your session and session environment are defined by a shell (where things like the prompt and shortcuts might be customized). The command line is where you type commands while the cursor blinks.
Built-in terminal commands
Basic built-in terminal commands help allows you to navigate your computer's file system along with base level tasks such as create, copy, rename and delete:
- Move around your directory structure:
cd
- Create directories:
mkdir
- Create files (and modify their metadata):
touch
- Copy files:
cp
- Move files:
mv
- Delete files or directories:
rm