Learn

CLI: driving a computer by typing commands

A CLI (command-line interface) is a way to control a program by typing text commands instead of clicking a graphical interface. You enter a command, the program runs it and prints text back. It is the standard way to operate a server over a remote connection, where there is no screen to click on.

At a glance

What it is
Controlling a program by typing commands, reading text replies
Why it dominates servers
It works over a plain remote connection, with no graphical desktop
Why it is worth learning
Commands are exact, repeatable, and easy to script and share
Where you meet it
The shell prompt after you log in to a machine
Flow

The command-line loop

You type a command, the program runs it and prints text back, you read the result and type the next one. The same exact command can be saved into a script and replayed.

1
You type a command exact text at the shell prompt
2
The program runs it does the work, prints text output
3
You read and repeat or save the command into a script to replay

What is a CLI?

A CLI (command-line interface) is the plain way to drive a computer: you type a command as text, press enter, the program does the work and prints text back. There are no windows or buttons, just a prompt waiting for the next instruction. You meet it the moment you log in to a server, where that prompt, the shell, is the whole interface you get.

It can feel bare at first, because nothing is laid out for you to click. The trade is that everything is exact. A command means precisely what it says, and it does the same thing every time you run it.

Why run servers from the command line?

Two practical reasons. First, reach: a CLI works over a plain remote connection, so you can operate a machine in a data centre on the other side of the planet with nothing but a terminal. There is no graphical desktop to ship across the network, which is exactly what you want on a lean server.

Second, repeatability. Because a command is just text, you can save it, schedule it, paste it into a guide, or chain a hundred of them into a script that runs the same way every time. That is why setup notes on this blog are full of commands you can copy: a clicked button cannot be handed to someone else, but an exact command can.

Command-line interface

  • Works over a plain remote connection to a server
  • Exact and repeatable: the same text does the same thing
  • Easy to script, schedule, and paste into a guide
  • Light on resources; no desktop required

Graphical interface

  • Usually needs a screen and a desktop session
  • Easier to explore when you do not know the command
  • Harder to automate or reproduce step by step
  • Friendlier for one-off, visual tasks

Related terms

← All terms Reviewed: June 2026