Command Prompt Flashcards

1
Q

What is a shell?
What is the terminal?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why using the terminal?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you open the Command Prompt on Windows?

A

There are 2 options

A) via the start menue
Click Start
Type cmd

B) via the Run program
Windows key + R
Type cmd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name the command that s needed to trace back the Hops that are needed to load a website?

A

Tracert ‘website’ > IPv6 format
Tracert -4 ‘website’ > IPv4 format

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you navigate to a folder/ create a folder if it does not exist yet?

A

mkdir …

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you go into a folder or direction?

A

cd C:\Users\ekalb...
Be aware to use backslashes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can you create a new file in a directory?

A

echo. > name.html

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How can you check which files exist under a directory?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How can you add text to a file?

A

echo. YourTextHere&raquo_space; file_name.txt

Example:
echo This is some additional text&raquo_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.&raquo_space; file_name.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can you open a file from cmd?

A
  1. To open a text file named “example.txt” in the current directory:
    start “Text File” “example.txt”
  2. To open a PDF file located in a specific folder:
    start “PDF Document” “C:\Path\To\Document.pdf”
  3. To open a web page in the default web browser:
    start “Website” “https://www.example.com”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How can you open a file with Visual Studio Code?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Version Control Program:
What is meant by the terms

1) Forking
2) Cloning
3) Merging

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly