DEV Community


Posted on • Updated on • Originally published at

Developer Dictionary: CLI Command Line Interface

This post is part of a resource called Developer Dictionary. More about why I'm writing this here

What is it

A way for users to interact with the computer directly (i.e. with operating system and computer hardware). Each command is a small software program that takes some input from the user, does some work, and returns some output to the user. The input and output is text — typed or displayed in a terminal window. These small programs (aka commands) are intended to be combined with other commands to accomplish some higher level task or a user's goal. Meaning they are composable.


Mouse pointer, touchscreen, LCD screen, Windows, Icons — these things that we take for granted took decades of research to bring about. Computing didn't start off with graphical user interfaces (GUIs). Before touchscreens and mouse pointers, computing was about typing text and reading text.

So now that we have GUIs why do programmers still use the command line? You may be wondering are there things we can do with the CLI that we can't do with a GUI? Yes. Or rather there are things that are much more convenient to do with command line because it offer more control and it's more expressive. For example let's say we want to:

-- Performing some repetitive tasks on a schedule? Like delete older photos once week.

-- Running a program automatically when you start your computer.

-- Find some text in a bunch of files and or rename a bunch of files at the same time.
All the above can be accomplished nicely with a command line programs (aka scripts) like cron, sed, awk, launchd ,launchctl, etc.

There are many tutorials and cheatsheets on the Internet with details on the above and many other commands — what they do, how to use them, etc. We're not going to focus on that. Let's talk about some concepts that are common to all commands and are useful for understanding the 'big picture' around interacting with a computer using a Command Line Interface.

Big Picture Concepts

If text scrolling on a command line looks like gibberish to you well that's it is a different language. One that can be learned and used effectively. Here we explore some common terms and concepts and make things less mysterious.keep reading

Top comments (0)