A beginner guide to Command Prompt β opening it, essential commands and what it can do.
⏱ 4 min readIntermediateUpdated May 2026
Quick Answer
Open Command Prompt: press Windows + R, type cmd, press Enter. Or search 'cmd' in the Start menu. Key commands: dir (list files), cd (navigate), ipconfig (network info), ping (test connection), cls (clear screen).
How to Open Command Prompt
Fastest: Windows key + R, type cmd, press Enter
Search: Click Start, type Command Prompt, press Enter
As Administrator: Search cmd, right-click, Run as administrator (required for many system commands)
Essential Commands
1
dir β List files and folders
Type dir and press Enter to see all files and folders in the current location. dir /w shows a compact wide view. dir /s includes all subdirectories.
2
cd β Change directory (navigate)
cd Documents moves into the Documents folder. cd .. goes up one level. cd \ goes to the root of the drive. Press Tab to auto-complete folder names.
3
ipconfig β See your network details
ipconfig shows your IP address, subnet mask and default gateway. ipconfig /all shows full details. Essential for diagnosing network issues.
4
ping β Test a connection
ping google.com tests whether you can reach Google and shows response times. If pings time out, there is a connectivity issue between you and that destination.
5
sfc /scannow β Scan for corrupted system files
Run as administrator: sfc /scannow scans and repairs corrupted Windows system files. Useful when Windows is behaving strangely. Takes 5-15 minutes.
6
cls β Clear the screen
cls clears all previous output from the window β useful when the screen is cluttered.
Windows Terminal and PowerShellWindows Terminal (Windows 11) is a modern replacement with tabs. PowerShell is a more powerful scripting environment that accepts most CMD commands. For basic tasks, Command Prompt is sufficient.
Frequently Asked Questions
Command Prompt (cmd.exe) is the original Windows command line with a limited command set. PowerShell is more powerful β it accepts most CMD commands plus many more, and supports automation scripting. For basic tasks like ipconfig and ping, both work identically. For advanced system administration, PowerShell is significantly more capable.
Search Command Prompt in the Start menu, right-click, Run as administrator. The title bar shows Administrator: Command Prompt. Many system commands only work with administrator rights and show Access denied without them.