Lesson 4—Use the Command Line Flashcards

1
Q

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

A

The command-line interface provides these advantages:
• 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
The four parts of a command string are as follows:
• 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 tasks?
• Print working directory
• List
• Change directory
• Indicate parent directory
• Indicate current user home folder
• Create a folder
• Run the command with root account access
• Clear the Terminal screen
• Use the Spotlight index to find a file
A

Use these commands to perform the following tasks:
• Print working directory: pwd
• List: ls
• Change directory: cd
• Indicate parent directory: ..
• Indicate current user home folder: ~
• Create a folder: mkdir
• Run the command with root account access: sudo
• Clear the Terminal screen: clear or press Control-L
• Search for files with the Spotlight index: mdfind

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

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

A

You should 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
5
Q

What is the default shell interpreter in macOS Big Sur?

A

The Z shell (zsh) is the default shell in macOS Big Sur, but the bash shell is still available.

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