Command Prompt
A command prompt is part of a computer's text-based command line interface. The prompt appears as user and directory information following by a specific symbol and text cursor, indicating that the computer is ready for the user to enter commands. Most operating systems provide access to a command prompt as an alternative to its graphical user interface. Unix, Linux, and macOS users can access the command prompt using the Terminal app, while Windows users can access it by opening the Command Prompt utility, cmd.exe.
The command prompt often includes several pieces of important information. On Unix, Linux, and macOS, it starts with the username of the current user, followed by the computer name. After that, it includes the current directory where it will carry out commands; by default, the command prompt starts in the user's home directory, indicated by a ~ symbol. Windows formats its command prompt differently, omitting the user and computer name and starting with the full path of the current directory (including the drive letter). Finally, the command prompt ends with a symbol separating it from the commands the user enters, like a $, %, or >.
A typical Unix command prompt follows this pattern:
username@computername:/directory$
A macOS command prompt follows a similar pattern, but with spaces between elements:
username@Computer-Name directory %
Finally, the Windows command prompt remains the same as the DOS prompt:
C:\Users\Username>
Using the command prompt to issue commands requires memorization of some syntax and commands. While you can consult online guides or written documentation for commands that you won't use that often, it is still helpful to be familiar with at least some basic navigation commands. The cd command (used by Unix-based operating systems and Windows) lets you change the directory you're currently working in, either by entering a full path or a relative path from the current location. To see the files and folders within the current directory, you can use the ls command on Unix, Linux, and macOS, or the dir command on Windows.