The Command Prompt
Control your computer with words. No mouse required. Every command demonstrated live.
You have been using your computer through a graphical interface your entire life — clicking icons, dragging windows, right-clicking menus. That interface was designed for people who don't know what they're doing. It is deliberately simple, deliberately limited, and deliberately slow.
Underneath it is a direct communication channel. A text interface where you type instructions and the computer executes them — immediately, precisely, without a mouse.
That channel is the command prompt.
Opening the Command Prompt
Press Windows key + R
Hold the Windows key (bottom left of keyboard, between Ctrl and Alt) and press R. A small "Run" dialog appears in the bottom left corner of the screen.
Type cmd and press Enter
Type cmd into the Run dialog and press Enter.
The window opens
You will see a black window with white text and a blinking cursor. This is the Command Prompt. It looks like something from 1985. It is, in fact, more powerful than anything you can click on.
Or: Search for "Command Prompt" in the Start menu — click the magnifying glass icon, type "Command Prompt", and press Enter.
This is what the Command Prompt looks like when you first open it. The blue C:\Users\Bittu> is your cursor — it shows your current location inside the computer's folder system. Everything you type goes after this.
The cursor shows you where you currently "are" in the computer's folder structure — something like C:\Users\YourName>. This is your current location, exactly like being inside a folder in Windows Explorer. Except here, you navigate with words.
> symbol is the full path to where you are. You'll navigate from here.The Commands
Work through each of these in order. Type them yourself — don't copy-paste yet. The muscle memory matters.
mkdir TestFolder and mkdirTestFolder are different things — one creates a folder, the other is an error.dir — See What's in Your Current Folder
What it does: Lists every file and folder in the location you're currently at. The exact equivalent of opening a folder in Windows Explorer and seeing the contents — except this lists everything instantly, shows file sizes, and can be filtered, sorted, and processed by code.
Why it matters: In code, you will constantly need to know what files exist in a location before doing anything with them. dir is how you check. It also works with wildcards — dir *.pdf shows only PDF files.
Try it: Type dir and press Enter. You will see a list of everything in your current folder.
Type dir and press Enter. You see every file and folder in your current location, along with file sizes and last-modified dates. <DIR> means it is a folder. A number means it is a file and that number is its size in bytes.
cd — Move Between Folders
What it does: Changes your current location to the Desktop folder. cd stands for "change directory" — a directory is just another word for folder.
Why it matters: Every command runs in the context of where you currently are. To work with files on your Desktop, you go to the Desktop. To work with files in a client folder, you go there. Navigation is fundamental.
Useful variations:
cd Desktop— go into the Desktop foldercd ..— go up one folder levelcd C:\Users\Bittu\Documents— jump directly to any folder
Try it: Type cd Desktop and press Enter. Notice the prompt changes to show your new location.
Notice how the prompt changed from C:\Users\Bittu> to C:\Users\Bittu\Desktop>. That is you moving. You are now inside the Desktop folder. Every command you type next will run from here.
mkdir — Create a Folder Without Touching the Mouse
What it does: Creates a new folder called TestFolder in your current location. Instantly. No right-click, no "New Folder", no typing the name in Explorer.
Why it matters: In automation scripts, you constantly need to create folders to organize output. A script that processes 500 invoices might create Processed\, Errors\, and Archive\ folders automatically before it starts. mkdir is how you do that in code.
Try it: Type mkdir TestFolder and press Enter. Then dir to see it appeared. Then open Windows Explorer and watch it be there.
You typed mkdir TestFolder — and it appeared. The green <DIR> TestFolder line in the dir output confirms it was created. Open Windows Explorer on your Desktop right now and you will see it physically there.
The moment of realization: You just created a folder without touching the mouse. Now imagine doing this for 100 client folders, each named differently, each in the right place — structured from a spreadsheet, in 2 seconds.
echo — Create a File with Content
What it does: Creates a file called test.txt containing the text "Hello, this is my first file". The > symbol means "send the output into this file." If the file doesn't exist, it creates it. If it does, it overwrites it.
Why it matters: In automation, you often need to create log files, output reports, or write results somewhere. echo and its more powerful equivalents do this in code.
Try it: Type the command and press Enter. Then dir to see test.txt. Then type type test.txt to read what's inside it.
echo Hello > test.txt created the file silently. type test.txt reads it back. The file now physically exists on your Desktop — created entirely through text commands.
rename — Rename a File
What it does: Renames test.txt to renamed.txt. No right-click, no F2, no slow double-click-wait.
Why it matters: This is where you feel the power. Rename one file: 3 seconds. Rename 500 files: also 3 seconds, if you write the right instruction. The manual version of renaming 500 files would take hours. The code version is the same command, applied in a loop.
Try it: Type the command. Then dir to see the name changed.
test.txt is gone. renamed.txt now exists in its place. Same content, new name. Do this in a loop across 500 files and you have automated 3 hours of work into one command.
del — Delete a File
What it does: Permanently deletes renamed.txt. No Recycle Bin. Gone.
Why it matters: This command should make you slightly nervous — and that nervousness is appropriate. Code executes exactly what you tell it to, including destructive operations. This is why we test scripts on copies of files before running them on originals. Always.
del bypasses the Recycle Bin. There is no undo. Before running any script that uses del, always test it on a folder with 5 dummy copies first. Never on real data. This rule applies forever — even when you are experienced.Try it: Delete the file. Confirm with dir it's gone.
renamed.txt is gone. No warning. No Recycle Bin. The dir output shows 0 files remaining. This is why the rule exists: always test destructive commands on copies first.
ipconfig — Your Computer's Network Identity
What it does: Shows all network information for your computer — your IP address, subnet mask, default gateway, and more. Your computer's network identity card.
Why it matters: When you build web apps, you will often run a local development server (your app running only on your computer). Your IP address is how you access it from another device on the same network — useful for testing your app on your phone while it runs on your laptop.
Try it: Run it. Find the line that says "IPv4 Address." That's you, on your local network.
The green 192.168.1.5 is the laptop's IP address on the local Wi-Fi network. Anyone on the same Wi-Fi can reach a running app on this machine using that address. This is how you test your app on a phone during development.
tasklist — Every Single Program Running Right Now
What it does: Lists every process — every program — currently running on your computer. Chrome has 15 processes. Antivirus has 3. Background Windows services. Everything.
Why it matters: When code is running, it appears here. When a server is running, it appears here. When something is using too much memory and your computer is slow, you find it here. Developers use this constantly.
Try it: Run it. Scroll through. You will recognize some names and be surprised by how many things are running that you never opened.
Every line is a program running on your computer right now. msedge.exe is the browser. Code.exe is VS Code. node.exe is a running JavaScript server. claude.exe is Claude Code. The PID column is a unique ID for each process — you use it with taskkill to close a specific one.
taskkill — Close Any Program Without Clicking
What it does: Force-closes Notepad. /IM means "by image name" (the program's filename). /F means force — don't ask, just close it.
Why it matters: When a program freezes and won't respond to clicks, developers close it this way. When running automated tests, you start and stop browsers this way. When a server needs to be restarted from a script, you kill the old process this way.
Try it: Open Notepad first (Start menu → Notepad). Then run this command. Watch Notepad close without you touching it.
SUCCESS: The process "notepad.exe" has been terminated. — Notepad closed the instant you pressed Enter. No clicking. This is exactly how deployment scripts restart web servers without anyone physically touching the machine.
Close any app with a sentence. Not just Notepad — anything. Chrome: taskkill /IM msedge.exe /F. Excel: taskkill /IM excel.exe /F. This is exactly how deployment scripts restart web servers without anyone physically touching the machine.
systeminfo — Your Computer's Complete Identity
What it does: Displays everything about your computer — operating system version, registered owner, manufacturer, processor details, total physical memory, installed hotfixes, network adapters, and more.
Why it matters: When setting up a new developer environment, when debugging an issue that only happens on one machine, when writing installation instructions — you need to know exactly what you're dealing with. systeminfo tells you everything in one command.
Try it: Run it. Scroll through. Notice how much the computer knows about itself.
Everything about this machine in one command — OS version, manufacturer (HP), model (OMEN laptop), processor (Intel ~2900 MHz), 32 GB RAM, timezone (IST). When developers say "it works on my machine," this is the machine they mean.
ping — Your Computer Talking to Another Computer
What it does: Sends 4 small messages ("packets") to Google's servers and waits for a reply. Reports how long each round trip took in milliseconds. This is your computer having a conversation with a machine thousands of kilometres away.
Why it matters: This is exactly what happens when you open a website — your browser pings a server, the server responds with the webpage content, your browser displays it. Ping lets you see this communication directly. It also tells you if a server is reachable (if ping fails, the server might be down or your network might be broken).
Try it: Run it. Notice the response time in milliseconds. Run ping 8.8.8.8 (Google's DNS server, by IP address) and notice it's the same thing — IP addresses and domain names both work.
4 packets sent, 4 received, 0% loss. Average response time: 25ms — a quarter of a second to reach Google's servers and back. The green lines are Google's servers replying. If you see "Request timed out" instead, your internet connection has a problem.
netstat — Every Connection Your Computer Has Open
What it does: Lists every active network connection your computer currently has — every open socket, every listening port, every established connection to a remote server. The -a flag shows all connections, -n shows addresses as numbers (faster).
Why it matters: Your computer is talking to dozens of servers right now. Chrome is connected to Google. Windows Update is checking for updates. Your antivirus is phoning home. When you run a local web server during development, you will see it appear in this list. When you need to know which "port" your app is running on, this is where you look.
Try it: Run it. You will see many ESTABLISHED connections to IP addresses you don't recognize. That's your computer's ongoing conversations with the internet.
The yellow lines — port 3000 and 5173 — are local development servers running right now (Next.js and Vite). The green ESTABLISHED lines are live connections to external servers. LISTENING means waiting for someone to connect. Your computer is never truly idle.
shutdown /s /t 60 — Schedule Your Computer to Shut Down
What it does: Schedules your computer to shut down in 60 seconds. /s means "shutdown" (as opposed to restart). /t 60 means "after 60 seconds." A countdown notification will appear on screen.
Why it matters: Servers run scripts that shut down or restart on a schedule — every night at 2am, or after a big task completes, or if memory usage gets too high. This is how you do that from code.
shutdown /a right after to cancel the countdown before it reaches zero.shutdown /a — Cancel That Shutdown
What it does: Cancels a pending shutdown. The countdown stops. Computer keeps running.
Why it matters: The same way you wrote the shutdown instruction, you can write the cancel instruction. Code can both start and stop processes. This bi-directional control is fundamental.
Try it: Run the previous command (shutdown /s /t 60), then immediately run this one. The countdown will disappear.
Two commands — one starts the shutdown, one cancels it. The key lesson: code controls your entire computer, including operations you previously thought required physical access or clicking. Servers are shut down and restarted remotely this way, millions of times every day.
The Punchline
You just controlled your computer entirely with words.
You created folders. You renamed files. You saw every running program. You closed an app without clicking. You checked your network identity. You pinged servers in another country. You watched active connections to servers you didn't know you were connected to. You scheduled and cancelled a shutdown.
All without touching the mouse. All in under 5 minutes.
Now hear this:
Every app on your phone, every website, every piece of software you have ever used — Tally, WhatsApp, your bank's website, Netflix, Instagram — is built from instructions exactly like the ones you just typed. Just more of them, organized better.
The commands you just ran are the same category of thing as the code that runs WhatsApp's servers. The difference is scale and sophistication, not kind.
Netflix engineers write code that says: open this file, read this data, format it like this, send it to that screen. The instruction you just ran said: open this folder, list the files. Same thing. Different scale.
Practical Exercise
Do this before moving to the next section. It takes 3 minutes.
Task: Create a simple project folder structure using only the command prompt.
Navigate to the Desktop
Type cd Desktop and press Enter. Your prompt should change to show \Desktop> at the end.
Create the project folder
Type mkdir my-first-code and press Enter. This creates the folder.
Move into it
Type cd my-first-code and press Enter.
Create subfolders
Type mkdir src and press Enter. Then mkdir assets and press Enter.
Create a file
Type echo My first project > README.txt and press Enter.
Verify everything is there
Type dir and press Enter. You should see src, assets, and README.txt listed.
Every folder and file in this structure was created with typed commands — no mouse, no right-click, no Explorer. Open Windows Explorer now and check your Desktop. The my-first-code folder is physically there, with src\, assets\, and README.txt inside it.
You just used the command prompt to create something real. This is the same workflow that professional developers use every day — create folders, create files, navigate, verify. The only difference between what you just did and what a senior developer does is the complexity of the instructions. The method is identical.
my-first-code folder. Open it. You should see src, assets, and README.txt physically there — created entirely through text commands. That physical folder is proof that what you typed was real.Next: Python — the language that turns these ideas into real automation for your CA practice.
- I can open the command prompt without looking up how (Win+R → cmd → Enter)
- I can use dir, cd, mkdir, echo, rename, del, ping, tasklist from memory
- I understand why
delbypasses the Recycle Bin — and I will always test destructive commands on copies first - I completed the practical exercise and built the folder structure using only commands
- I feel the gap between clicking to rename 500 files (days) vs one loop command (3 seconds)