Command Prompt Flashcards
What is a shell?
What is the terminal?
A shell is a program that processes commands and access the Operating System’s Services.
The operating system shell, in general, is accessed through a terminal. It is called a shell because it is the layer that surrounds the operating system.
A terminal emulator (commonly called terminal) is a program that opens a window and lets you interact with the shell. In short, the terminal provides access to the operating system.
Why using the terminal?
1) Completing tasks faster: well, believe it or not, as you will soon see, some tasks can be completed much faster using the terminal than with graphical applications and menus.
2) Advanced configuration and maintenance: the terminal allows you to execute specific commands to perform system configuration and maintenance. Some of these commands may not be available through the graphic interface or the menus in your operating system.
3) Scripts: the terminal allows you to create and run command scripts to automate everyday tasks.
How do you open the Command Prompt on Windows?
There are 2 options
A) via the start menue
Click Start
Type cmd
B) via the Run program
Windows key + R
Type cmd
Name the command that s needed to trace back the Hops that are needed to load a website?
Tracert ‘website’ > IPv6 format
Tracert -4 ‘website’ > IPv4 format
How do you navigate to a folder/ create a folder if it does not exist yet?
mkdir …
How do you go into a folder or direction?
cd C:\Users\ekalb...
Be aware to use backslashes
How can you create a new file in a directory?
echo. > name.html
How can you check which files exist under a directory?
dir
> This command will display a list of all files and directories in the current folder, including their names, sizes, and modification dates.
dir /A-D
> you want to list only the files (excluding directories), you can use the /A-D option with the dir command:
How can you add text to a file?
echo. YourTextHere»_space; file_name.txt
Example:
echo This is some additional text»_space; example.txt
> This command will append the specified text to the end of the “example.txt” file.
If you want to add a blank line before you can do it by
echo.»_space; file_name.txt
How can you open a file from cmd?
- To open a text file named “example.txt” in the current directory:
start “Text File” “example.txt” - To open a PDF file located in a specific folder:
start “PDF Document” “C:\Path\To\Document.pdf” - To open a web page in the default web browser:
start “Website” “https://www.example.com”
How can you open a file with Visual Studio Code?
Actually it’s very similar. Once you have Visual Studio Code installed you can use ‘code’ to refer to it as a program.
Vstart “html file” code “path\to\code.html”
You can start with this input right away, no need to go to the correct directory first
Version Control Program:
What is meant by the terms
1) Forking
2) Cloning
3) Merging
1) Forking a repository - creating a copy of a remote repository on your GitHub,
2) Cloning a repository - downloading a remote git repository to your machine using git clone.
3) Merging the changes you made locally on your computer and pushed on your GitHub into the forked repo with the original repo using a pull request.
Note: You don’t have to fork in order to clone, forking is just needed when you want to contribute to the project