Command Line Basics Flashcards

1
Q

What is the command line?

A

The command line is a way to interact with the computer using specific words called “commands”.

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

How do you open the command line on your computer?

A

On Mac: Open your applications folder and find “Terminal”.

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

How can you navigate to a particular directory?

A

You can use the cd command to change directories.

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

Where will cd on its own navigate you to?

A

On Linux and Mac, it will navigate you home.

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

How do you display the name of the directory you are currently in?

A

On Linux and Mac, use the pwd (print working directory) command.

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

How do you display the contents of the directory you are currently in?

A

On Linux and Mac, use the ls command. Use ls -l to display the files in a list.

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

How do you create a new directory?

A

You can do this using the mkdir command.

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

How do you create a new file?

A

On Linux and Mac, use the touch command, e.g., touch new-file.txt.

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

How do you destroy a directory or file?

A

On Linux and Mac, use the rm command. To destroy folders, use rm -r or rmdir.

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

How do you rename a directory or file?

A

On Linux and Mac, use the mv command, e.g., mv folder/old-file.txt folder/new-file.txt.

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