Back to DevOps Series
Command Prompt (cmd.exe) :

Command Prompt (cmd.exe) :

Command Prompt (cmd.exe) is Windows’ basic command-line tool.
You use it to run simple commands like:
  • checking files
  • navigating folders
  • network tests
  • running batch scripts
It is older and simpler than PowerShell.

2. Why DevOps Engineers Should Know CMD

Even though CMD is old, it is still useful on Windows.
Basic troubleshooting
Example:
ping google.com
Checks if internet is working.
ipconfig
Shows network details.

Checking system / network info
Example:
systeminfo
Shows OS, RAM, and system details.

Working on Windows Servers
CMD is always available on Windows Server.
Example:
tasklist
Shows running programs.

Used in automation tools
Some Windows automation tools use CMD commands in the background.

Remember:
👉 CMD is simple, always available, and still useful.

3. Basic Commands

📌 Show files

dir

📌 Move between folders

cd foldername
cd ..

📌 Create a folder

mkdir test

📌 Delete a file

del file.txt

📌 Clear screen

cls

5. CMD Scripting Basics (Batch Files)

Batch scripts use .bat extension.
Example:
echo Hello World
pause
Run it:
hello.bat

6. CMD Limitations (Important Point)

❌ No advanced automation
❌ No objects (text only)
❌ Weak scripting
❌ Not suitable for modern DevOps
This is why we use PowerShell and WSL/Linux for serious work.

7. When to Use CMD?

Use CMD when you need:
  • quick checks
  • simple commands
  • old scripts
  • basic troubleshooting