Lesson 4: Use the Command-Line Interface Flashcards

• Describe when the command-line interface is useful. • Use man pages to find more information about commands. • Manipulate files in the command-line interface.

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 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.
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:

  1. Command name
  2. Command options
  3. Arguments
  4. 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?

  1. Print working directory
  2. List
  3. Change directory
  4. Indicate parent directory
  5. Indicate current user home folder
  6. Create a folder
  7. Run the command with root account access
  8. Clear the Terminal screen
A

Use these commands to perform the following tasks:

  1. Print working directory: pwd
  2. List: ls
  3. Change directory: cd
  4. Indicate parent directory: ..
  5. Indicate current user home folder: ~
  6. Create a folder: mkdir
  7. Run the command with root account access: sudo
  8. Clear the Terminal screen: clear or press <kbd>Control-L</kbd>
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 <kbd>Tab</kbd> key to automatically complete filenames, pathnames, and command names.

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