Skip to main content

Using programs and commands that do not have a graphical user interface (GUI) but are rather controlled by typing text commands into a terminal program, or shell.

A command-line interface () is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks. On macOS the default shell is zsh and in the past it was bash. This tag is appropriate for all shells and command line questions whether using the or other program to access that shell. This text-only interface contrasts with the use of a mouse pointer with a graphical user interface () to click on options, or menus on a text user interface (TUI) to select options. A notable benefit of the command line is the ability to chain commands and operate with files as input and output which lead to powerful capabilities for automation and scripting.

This method of instructing a computer to perform a given task is referred to as entering a command. The system waits for the user to conclude the submitting of the text command by pressing the Enter key (a descendant of the carriage return key of a typewriter keyboard). A command-line interpreter then receives, parses, and executes the requested user command.

Upon completion, the command usually returns output to the user in the form of text lines on the CLI.

Related tag:

See also: Wikipedia Command-line_interface.

NOTE: Questions relating to programming (purely about the language, syntax, or runtime errors) belong at Stack Overflow where programming questions are best asked and answered. This tag is preferred for questions that don’t relate directly to the program as it is more general covering ssh, any terminal type app that use the features of the idiom and shell languages.

Code Language (used for syntax highlighting): lang-bash