DEV Community

Cover image for Terminal: The Interface That Makes You Understand Your Computer
Farhad Rahimi Klie
Farhad Rahimi Klie

Posted on

Terminal: The Interface That Makes You Understand Your Computer

Most developers start their programming journey with a graphical interface: an IDE, buttons, menus, file explorers, and colorful dashboards.

Then, sooner or later, they encounter something that looks much more intimidating:

$
Enter fullscreen mode Exit fullscreen mode

The Terminal.

For beginners, the terminal can feel old, difficult, and unnecessary. Why type commands when you can click buttons?

But as you become a developer, you begin to realize something important:

The terminal is not an outdated way of using a computer. It is one of the most direct ways to communicate with it.

In this article, we'll explore what the terminal is, why developers use it, how it works, and why learning it can fundamentally change the way you understand software.


What Is a Terminal?

A terminal is a text-based interface that allows you to interact with your operating system by typing commands.

Instead of this:

Open File Explorer
↓
Click a folder
↓
Find a file
↓
Right-click
↓
Choose an action
Enter fullscreen mode Exit fullscreen mode

You can do this:

cd projects
Enter fullscreen mode Exit fullscreen mode

or:

mkdir my_project
Enter fullscreen mode Exit fullscreen mode

or:

rm old_file.txt
Enter fullscreen mode Exit fullscreen mode

The terminal accepts your commands, sends them to the operating system, and displays the result.

A simplified model looks like this:

You
 │
 │ Type command
 ▼
┌─────────────┐
│  Terminal   │
└──────┬──────┘
       │
       ▼
┌─────────────┐
│    Shell    │
└──────┬──────┘
       │
       ▼
┌─────────────┐
│ Operating   │
│   System    │
└─────────────┘
Enter fullscreen mode Exit fullscreen mode

There are actually several different components involved.


Terminal vs Shell vs Command Line

These terms are often used interchangeably, but they are not exactly the same.

Terminal

The terminal is the application or environment where you type commands.

Examples include:

  • Windows Terminal
  • GNOME Terminal
  • iTerm
  • Alacritty

The terminal provides the interface.


Shell

The shell is the program that reads and interprets your commands.

For example:

ls
Enter fullscreen mode Exit fullscreen mode

The shell reads that command and decides what program or operation should be executed.

Popular shells include:

  • Bash
  • Zsh
  • Fish
  • PowerShell

The relationship looks like this:

┌──────────────────┐
│     Terminal     │
│                  │
│   You type here  │
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│      Shell       │
│                  │
│ Interprets input │
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ Operating System │
└──────────────────┘
Enter fullscreen mode Exit fullscreen mode

So technically:

The terminal displays the interface. The shell interprets your commands.


Your First Terminal Commands

Let's imagine you are using Linux or macOS.

When you open a terminal, you might see something like:

farhad@computer:~$
Enter fullscreen mode Exit fullscreen mode

This is called the prompt.

It means:

The shell is ready and waiting for your command.

Let's try a few commands.

Where Am I?

pwd
Enter fullscreen mode Exit fullscreen mode

pwd means:

Print Working Directory
Enter fullscreen mode Exit fullscreen mode

Example output:

/home/farhad
Enter fullscreen mode Exit fullscreen mode

Your working directory is simply the folder you are currently inside.


List Files

ls
Enter fullscreen mode Exit fullscreen mode

Example:

Documents
Downloads
Projects
Pictures
Enter fullscreen mode Exit fullscreen mode

This command asks the operating system:

Show me the files and directories here.

You can also use:

ls -l
Enter fullscreen mode Exit fullscreen mode

Which provides more information:

drwxr-xr-x Projects
-rw-r--r-- notes.txt
-rwxr-xr-x program
Enter fullscreen mode Exit fullscreen mode

Now you are not just seeing file names. You are seeing information about files.


Moving Through the Filesystem

Suppose your computer contains:

home
└── farhad
    ├── Documents
    ├── Downloads
    └── Projects
        └── database
Enter fullscreen mode Exit fullscreen mode

If you are currently here:

/home/farhad
Enter fullscreen mode Exit fullscreen mode

You can enter the Projects directory:

cd Projects
Enter fullscreen mode Exit fullscreen mode

Now:

pwd
Enter fullscreen mode Exit fullscreen mode

might return:

/home/farhad/Projects
Enter fullscreen mode Exit fullscreen mode

Then:

cd database
Enter fullscreen mode Exit fullscreen mode

Now you are here:

/home
└── farhad
    └── Projects
        └── database ← You are here
Enter fullscreen mode Exit fullscreen mode

To go back one directory:

cd ..
Enter fullscreen mode Exit fullscreen mode

The .. means:

Parent directory.

To go directly to your home directory:

cd
Enter fullscreen mode Exit fullscreen mode

These commands may seem simple, but they introduce one of the most important concepts in computing:

Everything has a location.


Creating Files and Directories

Create a directory:

mkdir my_project
Enter fullscreen mode Exit fullscreen mode

Now:

current_directory
└── my_project
Enter fullscreen mode Exit fullscreen mode

Move into it:

cd my_project
Enter fullscreen mode Exit fullscreen mode

Create a file:

touch main.c
Enter fullscreen mode Exit fullscreen mode

Now:

my_project
└── main.c
Enter fullscreen mode Exit fullscreen mode

You just created a project structure without opening a graphical file manager.

For example:

mkdir database
cd database

mkdir src
mkdir include
mkdir tests

touch src/main.c
touch include/database.h
Enter fullscreen mode Exit fullscreen mode

The result:

database
├── src
│   └── main.c
│
├── include
│   └── database.h
│
└── tests
Enter fullscreen mode Exit fullscreen mode

This is one reason developers love the terminal.

You can describe a sequence of actions precisely.


The Terminal Is Built Around Programs

One important thing to understand is this:

ls
Enter fullscreen mode Exit fullscreen mode

is not magic.

Usually, when you type a command, the shell searches for a program with that name and executes it.

For example:

gcc
Enter fullscreen mode Exit fullscreen mode

starts the C compiler.

You might write:

gcc main.c -o app
Enter fullscreen mode Exit fullscreen mode

Conceptually:

You
 │
 │ gcc main.c -o app
 ▼
Shell
 │
 │ Find gcc
 ▼
C Compiler
 │
 │ Compile main.c
 ▼
app
Enter fullscreen mode Exit fullscreen mode

Then you can run your program:

./app
Enter fullscreen mode Exit fullscreen mode

The terminal becomes the place where your entire development workflow happens.


Why Developers Prefer the Terminal

The biggest advantage is not that the terminal looks cool.

The real advantage is control.

With a GUI, you often perform actions manually.

For example:

Click
↓
Click
↓
Select
↓
Right-click
↓
Choose option
Enter fullscreen mode Exit fullscreen mode

With the terminal:

command argument option
Enter fullscreen mode Exit fullscreen mode

A command can be repeated exactly.

For example:

gcc main.c -o program
Enter fullscreen mode Exit fullscreen mode

You can run the same command:

gcc main.c -o program
Enter fullscreen mode Exit fullscreen mode

Again.

And again.

The instructions do not change.

This makes the terminal extremely useful for:

  • Programming
  • Building software
  • Managing files
  • Running servers
  • Compiling code
  • Debugging
  • Automation
  • Git
  • Docker
  • Databases
  • System administration

Commands Can Be Combined

This is where the terminal becomes especially powerful.

Suppose you want to see all files ending in .c.

You can use:

ls
Enter fullscreen mode Exit fullscreen mode

But you can also combine commands and filters.

For example:

ls | grep ".c"
Enter fullscreen mode Exit fullscreen mode

The | symbol is called a pipe.

It connects programs together.

Conceptually:

┌──────┐
│  ls  │
└───┬──┘
    │
    │ Output
    ▼
┌────────┐
│  grep  │
└───┬────┘
    │
    ▼
 Result
Enter fullscreen mode Exit fullscreen mode

This is one of the core ideas behind Unix-like systems:

Small programs can be combined to perform larger tasks.

Instead of building one giant program that does everything:

GIANT_PROGRAM
Enter fullscreen mode Exit fullscreen mode

Unix philosophy encourages:

Small Tool
     │
     ▼
Small Tool
     │
     ▼
Small Tool
     │
     ▼
Result
Enter fullscreen mode Exit fullscreen mode

The terminal makes this composition natural.


Input, Output, and Redirection

Programs usually have three important streams:

Standard Input
Standard Output
Standard Error
Enter fullscreen mode Exit fullscreen mode

You can think of them like this:

Keyboard
   │
   ▼
stdin
   │
┌──────────┐
│ Program  │
└────┬─────┘
     │
     ├──── stdout ────► Screen
     │
     └──── stderr ────► Error Message
Enter fullscreen mode Exit fullscreen mode

The terminal allows you to redirect these streams.

For example:

echo "Hello" > output.txt
Enter fullscreen mode Exit fullscreen mode

Normally:

echo "Hello"
Enter fullscreen mode Exit fullscreen mode

prints:

Hello
Enter fullscreen mode Exit fullscreen mode

But this:

echo "Hello" > output.txt
Enter fullscreen mode Exit fullscreen mode

sends the output into a file.

The result:

output.txt
Enter fullscreen mode Exit fullscreen mode

contains:

Hello
Enter fullscreen mode Exit fullscreen mode

You can also append:

echo "Another line" >> output.txt
Enter fullscreen mode Exit fullscreen mode

This simple concept is the foundation of many automation workflows.


The Terminal and Programming

If you are a C programmer, the terminal becomes especially important.

Imagine you have:

project
└── main.c
Enter fullscreen mode Exit fullscreen mode

You compile it:

gcc main.c -o program
Enter fullscreen mode Exit fullscreen mode

Now:

project
├── main.c
└── program
Enter fullscreen mode Exit fullscreen mode

Run it:

./program
Enter fullscreen mode Exit fullscreen mode

If you modify your source code:

main.c
Enter fullscreen mode Exit fullscreen mode

You compile again:

gcc main.c -o program
Enter fullscreen mode Exit fullscreen mode

Then run:

./program
Enter fullscreen mode Exit fullscreen mode

This gives you a direct understanding of the software pipeline:

Source Code
     │
     ▼
┌───────────┐
│ Compiler  │
└─────┬─────┘
      ▼
Machine Code
      │
      ▼
Executable
      │
      ▼
Operating System
      │
      ▼
Running Program
Enter fullscreen mode Exit fullscreen mode

An IDE can hide this process behind a button called:

Run
Enter fullscreen mode Exit fullscreen mode

But the terminal forces you to see what is actually happening.

That is valuable when you want to understand systems programming.


The Terminal Is Excellent for Automation

Imagine you have 1,000 files.

You want to perform the same operation on every file.

Doing this manually would be painful.

But with scripting:

for file in *.txt
do
    echo "$file"
done
Enter fullscreen mode Exit fullscreen mode

You can automate repetitive work.

A simple script might:

  1. Compile your program.
  2. Run tests.
  3. Create a backup.
  4. Generate logs.
  5. Deploy your application.

For example:

#!/bin/bash

gcc main.c -o app

./app
Enter fullscreen mode Exit fullscreen mode

Instead of manually typing multiple commands, you can execute:

./build.sh
Enter fullscreen mode Exit fullscreen mode

This is why terminals are closely connected to:

Automation
+
Programming
+
Reproducibility
Enter fullscreen mode Exit fullscreen mode

The Terminal and Git

Modern software development would be difficult without version control.

A typical Git workflow looks like this:

git status
Enter fullscreen mode Exit fullscreen mode

See what changed.

git add .
Enter fullscreen mode Exit fullscreen mode

Stage changes.

git commit -m "Add database page implementation"
Enter fullscreen mode Exit fullscreen mode

Create a commit.

git push
Enter fullscreen mode Exit fullscreen mode

Send your changes to a remote repository.

Conceptually:

Your Files
    │
    ▼
git add
    │
    ▼
Staging Area
    │
    ▼
git commit
    │
    ▼
Local Repository
    │
    ▼
git push
    │
    ▼
Remote Repository
Enter fullscreen mode Exit fullscreen mode

The terminal gives you direct access to these tools.


The Terminal Is Not Just for Linux

Many people associate terminals with Linux.

But command-line environments exist everywhere.

Linux

Common shell:

Bash
Enter fullscreen mode Exit fullscreen mode

or:

Zsh
Enter fullscreen mode Exit fullscreen mode

macOS

Common shells include:

Zsh
Enter fullscreen mode Exit fullscreen mode

and Bash.

Windows

You can use:

Command Prompt
PowerShell
Windows Terminal
WSL
Enter fullscreen mode Exit fullscreen mode

With WSL, Windows users can run a Linux environment directly alongside Windows.

The important thing is not the specific terminal application.

The important skill is learning how to think in commands.


The Terminal Changes How You Think

This is the part beginners often don't realize.

A graphical interface usually asks:

Where is the button?

The terminal asks:

What operation do I want to perform?

For example, instead of thinking:

Where is the button to create a directory?
Enter fullscreen mode Exit fullscreen mode

You think:

I want to create a directory.
Enter fullscreen mode Exit fullscreen mode

Then:

mkdir project
Enter fullscreen mode Exit fullscreen mode

This is a more direct relationship between your intention and the operation.

The terminal encourages you to think in:

Input
↓
Process
↓
Output
Enter fullscreen mode Exit fullscreen mode

That same model appears everywhere in programming.


A Practical Developer Workflow

Imagine starting a new C project.

You might do:

mkdir my_database
Enter fullscreen mode Exit fullscreen mode

Then:

cd my_database
Enter fullscreen mode Exit fullscreen mode

Create directories:

mkdir src
mkdir include
mkdir build
mkdir tests
Enter fullscreen mode Exit fullscreen mode

Create files:

touch src/main.c
touch include/database.h
Enter fullscreen mode Exit fullscreen mode

Compile:

gcc src/main.c -Iinclude -o build/database
Enter fullscreen mode Exit fullscreen mode

Run:

./build/database
Enter fullscreen mode Exit fullscreen mode

Check Git:

git status
Enter fullscreen mode Exit fullscreen mode

Commit:

git add .
git commit -m "Create initial project structure"
Enter fullscreen mode Exit fullscreen mode

In just a few commands, you have:

my_database
│
├── src
│   └── main.c
│
├── include
│   └── database.h
│
├── build
│   └── database
│
└── tests
Enter fullscreen mode Exit fullscreen mode

The terminal becomes your development control center.


Is the Terminal Difficult?

At first, yes.

You need to remember commands.

You need to understand paths.

You need to understand files and permissions.

You will make mistakes.

But you do not need to memorize hundreds of commands.

Start with these:

pwd
ls
cd
mkdir
touch
cp
mv
rm
cat
clear
Enter fullscreen mode Exit fullscreen mode

Then gradually learn:

grep
find
chmod
ps
kill
curl
ssh
Enter fullscreen mode Exit fullscreen mode

Then developer tools:

git
gcc
make
cmake
python
docker
Enter fullscreen mode Exit fullscreen mode

You learn the terminal the same way you learn programming:

One command at a time.


The Real Power of the Terminal

The terminal is powerful because it gives you a programmable interface to your computer.

A graphical interface is usually designed around predefined actions.

The terminal allows you to combine actions.

For example:

Program A
    │
    ▼
Program B
    │
    ▼
Program C
    │
    ▼
File
Enter fullscreen mode Exit fullscreen mode

You can create workflows that are:

  • Repeatable
  • Scriptable
  • Automatable
  • Precise
  • Fast

That is why the terminal remains essential even in a world filled with advanced graphical tools.


Final Thoughts

The terminal might look simple:

$
Enter fullscreen mode Exit fullscreen mode

But behind that small prompt is access to an enormous ecosystem of programs and system capabilities.

You can:

  • Navigate your filesystem.
  • Create and manage projects.
  • Compile programs.
  • Run applications.
  • Debug software.
  • Control Git repositories.
  • Connect to remote servers.
  • Automate repetitive tasks.
  • Build complete development pipelines.

The terminal is not something you need to master in one week.

Start small.

Learn how to move:

cd
Enter fullscreen mode Exit fullscreen mode

Learn how to inspect:

ls
Enter fullscreen mode Exit fullscreen mode

Learn how to create:

mkdir
Enter fullscreen mode Exit fullscreen mode

Then slowly connect those commands together.

Eventually, you may stop seeing the terminal as a black screen with confusing text.

You will see it for what it really is:

A direct interface between your ideas, your programs, and your computer.

And once you become comfortable with it, the terminal stops feeling like an obstacle.

It becomes one of the most powerful tools in your development workflow.

Top comments (0)