What Does "cmd" Mean on Linux, and How Is It Different From Windows Command Prompt?
Updated
On Linux, cmd is not a built-in command, program, or shell. It is almost always shorthand for the Windows Command Prompt (cmd.exe), a Windows-only program. Linux has no native equivalent named cmd; the comparable environment is a terminal running a shell such as Bash or Zsh. If you are on Linux and type cmd, expect a "command not found" error unless you have deliberately installed a Windows compatibility layer.
Where the confusion comes from
"cmd" is used in two different ways:
- On Windows,
cmdis the executable that opens Command Prompt, andcmd.exeis the program itself. - In general writing, "cmd" is often used loosely to mean "the command line" — any text interface where you type commands.
That second, loose usage is why people ask about "cmd on Linux." The thing they are pointing at — a text prompt where you type commands — does exist on Linux. It just is not called cmd.
Terminal, shell, and command line: the three pieces
These terms get mixed together, so it helps to separate them:
| Piece | What it is | Examples |
|---|---|---|
| Terminal | The window or program that displays text and passes your keystrokes through | GNOME Terminal, Konsole, xterm |
| Shell | The program that reads your commands, interprets them, and runs programs | Bash, Zsh, Fish, Dash |
| Command line | The line where you type, provided by the shell inside the terminal | The $ or % prompt |
On Windows, Command Prompt bundles these roles into one familiar program. On Linux they are separate components, which is why "the Linux cmd" is not a single thing you can name.
Running cmd.exe on Linux
There is no native way to run cmd.exe on Linux. The usual route is a compatibility layer such as Wine, which implements enough of the Windows environment to run some Windows programs. Even then:
- It is not part of a standard Linux install.
- Windows commands and their options will not behave like native Linux tools.
- Anything you learn in
cmd.exetransfers to Windows, not to Linux.
For everyday Linux work, learning the native shell is the more useful path.
The Linux equivalents of common cmd habits
If your goal is "do the thing I used to do in cmd," here is the mapping. The Linux Command Library organizes its cheat sheets around exactly these categories — system information, system control, users and groups, files and folders, networking, search, and more — which makes it a reasonable place to look up the native command for a task.
| Task | Windows cmd | Linux shell |
|---|---|---|
| List files | dir |
ls |
| Change directory | cd |
cd |
| Show current directory | cd (no args) |
pwd |
| Copy a file | copy |
cp |
| Move or rename | move / ren |
mv |
| Delete a file | del |
rm |
| Clear the screen | cls |
clear |
| Show system information | systeminfo |
uname -a, plus other system-information commands |
| Show network configuration | ipconfig |
ip addr |
Two habits worth dropping when you move to Linux: path separators are / rather than \, and command names are case-sensitive.
Choosing what to learn
- You work mostly on Windows: learn
cmd.exeand its commands; the Windows documentation is the right reference. - You work on Linux, or want to: learn Bash (the most common default) and treat "cmd" as a Windows term. Use a Linux command reference organized by task rather than translating Windows commands one by one.
- You need one specific Windows program on Linux: check whether Wine supports it before assuming
cmd.exewill work.
The practical rule: match your learning material to the platform you are actually using. A Windows cmd tutorial will teach you commands that Linux does not have, and a Linux cheat sheet will not help you at a Windows prompt.