Lesson 7 - Chapter 1: Introducing the Command Line Interface Flashcards
What does CLI stand for?
Command-Line Interface
What is a CLI?
a text-based interface app that sends typed commands to the command interpreter (shell)
What is a command interpreter also called?
Shell
Do all the different OS CLI accept the same commands?
No, but Linux and macOS accept similar commands
What are the (at least) 2 CLIs that Windows 10 and 11 have?
- Command Prompt
- PowerShell
What’s the executable file for Command Prompt?
cmd.exe
What is the “Terminal” in Win11?
is a…. that can…
The Terminal is a container that can run multiple CLIs on its own, different tab
What is a “container”?
a lightweight piece of software
How do you open a new tab in Terminal and choose its CLI in Win11?
You click the down arrow in the tabs area, click the CLI you want
How do you get to the Terminal in Win11 quickly?
Win + X or Right-Click the Start button, select Terminal
How do you set a default CLI in Win 11 to Command Prompt? [in Command Prompt]
5 steps
- Have the desired CLI open in the tab
- Settings
- Set “Default Terminal Application” to “Windows Console Host”
- Set “Default Profile” to “Command Prompt”
- Save
How do you quickly open a CLI tab in Terminal in Admin mode?
Ctrl right-click as you click the desired CLI
The macOS Terminal app accepts most of the same commands as…?
Linux
How do you get to the Terminal in macOS?
Finder > Applications > Utilities > Terminal
In a Linux command prompt, what does using the prefix “sudo” and “su” do? (2)
sudo = elevated privileges for the Linux command prompt
su = elevated privileges for the entire session
It’s the Linux version of running in Admin mode (except the app isn’t run in Admin mode it’s set by the user running the command)
What’s the difference between Command Prompt and command prompt?
- Command Prompt is the CLI name
- command prompt is the spot in the CLI where you type
What does “working directory” refer to?
Working directory = the current location
Can you customize the command prompt?
Yes, Power Users usually do
What is the default prompt for Windows CLI?
It shows the complete path to the working directory (including drive letter)
What is the default working directory in Windows 11?
the default working directory in Win 11 CLIs is the user’s personal directory
What does the Linux and macOS CLI command prompt show? (3)
- Current location (working directory)
- Current User
- System Name
What does > indicate in a Windows command prompt?
it means the end of the command prompt
For a Linux Terminal, what indicates the end of the prompt?
$ means the end of the command prompt for Linux
In Linux, what’s shorthand for the user’s home directory?
~ is shorthand for the user’s home directory
What does the “home directory” in Linux refer to?
the top-level directory to which the user has access
(roughly similar to Windows’s personal directory default)
Do you use drive letters in Linux Terminal app prompts?
No, drive letters don’t exist (for Linux and macOS)
Since drive letters don’t exist for Linux and macOS, how do multiple physical disks show up on those systems? (2)
- Linux = mounted in /mnt or /media/username
- macOS = mounted in /Volumes
Because macOS and Linux don’t use drive letters, how are the drives mounted?
the drives are mounted logically to the existing directory tree
What does the “cd” command do?
Changes the focus of the command prompt to another directory
(Change Directory)