Welcome to Windows Command Prompt
Command Prompt (CMD) is a Windows command-line
tool that allows you to interact with your
computer by typing commands.
In this tutorial, you will learn how to navigate
directories, manage files, troubleshoot networks,
and inspect running processes.
What You Will Learn
- Navigate between folders and directories.
- Create, copy, move, and delete files.
- Check network information and connectivity.
- View and manage Windows processes.
- Use essential CMD commands confidently.
Getting started:
Press Windows + R, type
cmd, and press Enter.
Your First Command
dir
This command lists files and folders
in your current directory.
Navigation Commands
Navigation commands help you move through
the Windows file system using Command Prompt.
Go to Root Directory
Jump to the root directory of your current drive.
cd\
Change Directory
Navigate to a folder using its full path.
cd C:\Users\YourName\Documents
Go Back One Directory
Move to the parent folder.
cd ..
Clear the Screen
Remove previous terminal output.
cls
List Files and Folders
Display the contents of the current directory.
dir
File Management
File management commands let you create,
remove, copy, and move files without
opening File Explorer.
Create a Folder
Create a new directory.
mkdir my-project
Delete an Empty Folder
Remove a folder that contains no files.
rmdir my-project
Delete a File
Delete a file from the current directory.
CMD deletion may bypass the Recycle Bin.
del notes.txt
Warning:
Check the file name and path before using
the delete command.
Copy a File
Copy a file to another location while
keeping the original.
copy notes.txt C:\Backup\notes.txt
Move a File
Move a file from one location to another.
move notes.txt C:\Archive\notes.txt
Network Commands
Network commands help you inspect network
information and troubleshoot connectivity.
Display IP Information
View your network adapters, IP addresses,
and default gateways.
ipconfig
Test Network Connectivity
Send test packets to a host and check
whether it responds.
ping google.com
Tip:
If a ping fails, the host may be unreachable
or may block ping requests.
System Commands
System commands help you inspect running
processes and manage Windows applications.
Show Running Processes
Display active tasks and background processes.
tasklist
Force Close an Application
Forcefully stop a running application.
Unsaved work may be lost.
taskkill /F /IM chrome.exe
Close Command Prompt
Exit the current Command Prompt session.
exit
Getting Started with CMD
Review the essential commands covered
throughout this tutorial.
How to Open Command Prompt
- Press Windows + R.
- Type
cmd.
- Press Enter.
- Start typing commands.
CMD Quick Reference
| Command |
Description |
cd\ |
Go to root directory |
cd [path] |
Change directory |
cd .. |
Go back one directory |
cls |
Clear the screen |
dir |
List files and folders |
mkdir [folder] |
Create a folder |
rmdir [folder] |
Remove an empty folder |
del [file] |
Delete a file |
copy [src] [dest] |
Copy a file |
move [src] [dest] |
Move a file |
ipconfig |
Display network information |
ping [host] |
Test network connectivity |
tasklist |
Show running processes |
taskkill /F /IM [name] |
Force close a process |
exit |
Close Command Prompt |