![]() |
When talking about computer science, especially programming or systems administration, you often hear about CLIs. For many beginners, this term might seem complicated or even "scary," but in reality, CLIs are powerful tools and, once understood, very simple to use.
In this article, we will see what CLI means, why it is so important, which are the most famous CLIs across various operating systems, and finally how to use them concretely, from startup to the most useful commands explained step-by-step.
What does CLI mean?
The acronym CLI stands for Command Line Interface.
In simple terms, a CLI is a way to communicate with a computer by typing text commands, instead of using a mouse to click on icons and windows (as happens in graphical interfaces, called GUIs – Graphical User Interface).
CLI vs Graphical Interface
- Graphical User Interface (GUI):
You click on icons, buttons, and menus (Windows, macOS, Linux desktops). - Command Line Interface (CLI):
You write text instructions that the system executes.
Example:
- GUI: you click on a folder to open it
- CLI: you write a command that tells the computer "open this folder"
Why are CLIs so important?
CLIs existed before graphical interfaces and are still fundamental today because:
- they are fast
- they allow for precise control of the system
- they are automatable (scripts)
- they work even on computers without a graphical interface
- they are the standard for servers, software development, and cybersecurity
Many advanced operations are only possible or better handled via CLI.
The most famous CLIs across various operating systems
Every operating system has one or more integrated CLIs.
Windows
- Command Prompt (CMD)
- The historical Windows CLI
- Simple but limited
- PowerShell
- More modern and powerful
- Supports advanced scripting
- Standard on Windows 10 and 11
macOS
- Terminal
- Based on UNIX
- Very similar to Linux
- Extremely powerful and widely used by developers
Linux
Linux is strongly CLI-oriented. The most common ones are:
- Bash
- Zsh
- Fish
The CLI is a central part of the Linux experience.
How to start a Command Line
Let's see how to open the CLI on various systems.
On Windows
Method 1 – Command Prompt
- Press
Win + R - Type
cmd - Press Enter
Method 2 – PowerShell
- Press
Win + X - Select "Windows PowerShell" or "Terminal"
On macOS
- Open Finder
- Go to Applications → Utilities
- Click on Terminal
Or use Spotlight:
- Press
Cmd + Space - Type
Terminal - Press Enter
On Linux
Usually, it is enough to:
- Press
Ctrl + Alt + T
Basic structure of a CLI
When you open a CLI, you will see something like:
user@computer:~$
This line indicates:
- the username
- the computer name
- the current folder
- the symbol
$indicates you can type a command
Fundamental commands (for beginners)
1. pwd – Where am I?
pwd
Means: Print Working Directory
Shows the path of the folder you are currently in.
Example:
/home/user/Documents
2. ls (macOS/Linux) / dir (Windows) – List files
ls
or on Windows:
dir
Shows all files and folders present in the current directory.
| dir |
3. cd – Change directory
cd Documents
Enters the "Documents" folder.
cd ..
Goes back to the parent folder (or the previous one if executed after cd <folder_name>).
This command is essential for navigating the file system.
4. mkdir – Create a folder
mkdir new_folder
Creates a new folder called new_folder.
5. touch (macOS/Linux) – Create a file
touch file.txt
Creates an empty file named file.txt.
On Windows (PowerShell):
New-Item file.txt
6. cp / copy – Copy files
macOS/Linux:
cp file.txt copy.txt
Windows:
copy file.txt copy.txt
Copies file.txt to copy.txt.
7. mv / move – Move or rename
macOS/Linux:
mv file.txt new_name.txt
Windows:
move file.txt new_name.txt
Used both for moving files and for renaming them.
8. rm / del – Delete files (WARNING)
macOS/Linux:
rm file.txt
Windows:
del file.txt
⚠️ Warning: files deleted via CLI do not go to the trash but are permanently deleted immediately.
9. clear / cls – Clear screen
macOS/Linux:
clear
Windows:
cls
Used simply to make the screen tidier.
10. help / --help – Ask for help
Windows:
help
macOS/Linux:
ls --help
Shows all available options for a command.
Why learn CLIs today?
Learning to use a CLI means:
- understanding better how the computer works
- working faster
- gaining skills in high demand in the IT world
- feeling more confident and independent
Even if it seems difficult at first, just a few commands are enough to become productive.
A tip before finishing: man
What is man
man stands for manual and is the command used on Linux and macOS to read command documentation directly from the terminal.
Example:
man ls
Shows the complete manual for the ls command.
man on Linux and macOS
✅ Present by default
On:
- Linux
- macOS
man is always available and is the standard for consulting:
- command description
- syntax
- options
- examples
man on Windows
❌ On native Windows, unfortunately, man is not directly supported:
- CMD → ❌
mandoes not exist - PowerShell → ❌
mandoes not exist
Windows uses a different system:
Get-Help command
Example:
Get-Help Get-ChildItem
✅ When man DOES exist on Windows
man is available on Windows only if you use a Unix-like environment.
1. WSL (Windows Subsystem for Linux) – RECOMMENDED
With WSL, you install a real Linux distribution on Windows.
In this case:
man ls
✅ It works exactly like on Linux
2. Git Bash
If you install Git for Windows, you will have:
- Git Bash
- partial support for
man
It works for many Unix commands:
man git
3. Cygwin / MSYS2
Unix environments on Windows:
manavailable- more advanced / technical use
Summary Table
| System | man available |
|---|---|
| Linux | ✅ Yes |
| macOS | ✅ Yes |
| Windows CMD | ❌ No |
| Windows PowerShell | ❌ No |
| Windows + WSL | ✅ Yes |
| Git Bash | ✅ (partial) |
Conclusion
CLIs (Command Line Interface) are a fundamental tool in modern computer science. They are not just for "geeks" or expert programmers: with the right explanations, anyone can learn to use them.
If you started today, you are already one step ahead 🚀
The command line is not an enemy: it is a powerful ally 😉
Follow me #techelopment
Official site: www.techelopment.it
facebook: Techelopment
instagram: @techelopment
X: techelopment
Bluesky: @techelopment
telegram: @techelopment_channel
whatsapp: Techelopment
youtube: @techelopment
