Timedora

Shells and the Command Prompt

An introduction to how a shell processes typed commands and how to distinguish the prompt from the command you enter.

What the and Do

What the and Do

A command-line interface (CLI) lets you interact with an operating system by typing commands into a . The reads and interprets what you type, runs the command, displays results or an error, and returns to a when it is ready for more input.

For example, a might look like this:

alex@computer:~/projects$

This can show information such as a username or current directory. It is a readiness indicator, not part of the command. Type the command after it and press Enter. In this example, the command could be:

ls -l reports

The interprets and runs ls -l reports; you do not type the ’s $ as part of that command.

symbols vary and are configurable. $ or > is common, and Bash often uses # for a root . But the symbol alone does not establish your permissions.

Shells and command syntax also vary. Bash is common on Linux and macOS, while Windows provides Command and PowerShell. Therefore, a command’s form or behavior may depend on which you are using.