Lesson 12: Command-Line Interface Flashcards

1
Q

Key Points

macOS has a graphical user interface (GUI) that includes the Finder, designed to easily access files and perform tasks on a Mac.

The command-line interface (CLI) is a powerful tool for performing advanced tasks as an IT administrator.

The CLI can be accessed with the Terminal app in macOS, found in /Applications/Utilities.

The Terminal title bar shows the current directory, login shell, and current window size. The default login shell for computers running macOS Catalina or later is Z shell (zsh).

The prompt in the Terminal displays the current user, hostname of the computer, and current directory.

Commands have a three-part structure.

Command: a program or utility that will complete the action

For example, the ls command will list the contents of the current directory.

Option: modifies a command, the effect of which is determined by the command’s program

ls -l lists, and provides additional information about, the contents of the current directory.

Argument: provides additional information to the program, such as file path.

ls / lists the contents of the root directory, regardless of where the user is located.

Multiple options and arguments can be applied to a command, depending on the intended result.

The CLI is case-sensitive.

The man command provides the manual pages, or help documentation, for certain commands.

For example, man ls provides the manual pages for the ls command.

The which command provides the file path to a certain command.

For example, which ls provides the path to the ls command.

Search within a manual page by pressing the Forward slash key (/).

Exit a manual page by pressing Q.

A

https://youtu.be/SSqQRFk1rRw

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