

It can be modified to fit your needs, but usually displays some very basic information that shows you the context of what you're doing. This whole piece of text is called the prompt, or PS1. If you've just logged in, it's probably just a tilde ( ~), which represents the home directory. The colon is just for separation, and the displays the path of the directory that you are in. The portion represents the computer's name.

To follow along, log in to your virtual machine or server.īelow is an example of the prompt on an Ubuntu Linux server: above prompt follows this format: portion ("ubuntu") represents the current user that is logged in to the command line interface. Let's dissect the CLI's language for a moment. The command line can be the default interface for a computer, but most personal computers use a program (like Terminal) within the desktop graphical interface to provide the command line interface. For this book, however, we're only interested in the display and input of text and commands via the command line. Note that interface has a much broader definition these days. Let's look at the two parts of the command line interface: the display and the input. In a nutshell, the command line allows for text-based communication with a computer. The command line interface is a very basic interface that uses mostly text for both the display and input components of the interface. The Command Line Interface What is an interface?Īccording to the online Merriam Webster dictionary, an interface is "a system that is used for operating a computer: a system that controls the way information is shown to a computer user and the way the user is able to work with the computer." 1 As this definition explains, an interface has two parts: 1) a display of information about what the computer is doing and 2) a method for telling the computer what to do.
