Lesson 4—Use the Command Line Flashcards

1
Q

What are 7 advantages of using the command-line interface?

A
  • Additional administrative and troubleshooting options
  • More access to the file system
  • A remote login using the Secure Shell (SSH) protocol
  • Any administrator can run commands as the system administrator user or root using sudo
  • The ability to automate repetitive tasks using scripting
  • The ability to remotely administer multiple, even thousands, of Mac computers simultaneously using Apple Remote Desktop
  • Man page documentation that provides an explanation of command usage and references to other related commands
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the four parts of a command string?

A
  • Command name
  • Command options
  • Arguments
  • Extras
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which terminal command should you use to perform the following task?

• Print working directory

A

pwd

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

Which terminal command should you use to perform the following task?

• List

A

ls

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

Which terminal command should you use to perform the following task?

• Change directory

A

cd

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

Which terminal command should you use to perform the following task?

• Indicate parent directory

A

..

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

Which terminal command should you use to perform the following task?

• Indicate current user home folder

A

~

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

Which terminal command should you use to perform the following tasks?

• Create a folder

A

mkdir

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

Which terminal command should you use to perform the following task?

• Run the command with root account access

A

sudo

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

Which terminal command should you use to perform the following task?

• Clear the Terminal screen

A

clear or press Control-L

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

Which terminal command should you use to perform the following task?

• Use the Spotlight index to find a file

A

mdfind

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

Which key should you use if you want to automatically complete filenames, pathnames, and command names?

A

Use the tab key to automatically complete filenames, pathnames, and command names.

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

What is the default shell interpreter in macOS Big Sur?

A

The Z shell (zsh) is the default shell, but the bash shell is still available.

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

What symbol is shown at the end of the prompt when using zsh?

A

%

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

What symbol is shown at the end of the prompt when using bash?

A

$

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