Owner
Verification
Tags
Command Prompt/PowershellCurriculum
π Navigation & File System
cdβ Change Directorydirβ Directory Listingclsβ Clear Screen
Moves between folders.
cd C:\Users\YourName\Documents
cd .. :: Move up one directory
cd \ :: Jump to the root of the drive
Lists files and folders in the current directory.
dir
dir /a :: Show hidden/system files
dir /s :: Show files in all subdirectories
Wipes the CMD window.
cls
π File & Folder Management
mkdirormdβ Make Directoryrmdirorrdβ Remove Directorycopyβ Copy File(s)robocopyβ Extended Copy (files + directories)moveβ Move or Rename Filedelβ Delete File
Creates a new folder.
mkdir Projects
Deletes a folder (empty by default).
rmdir Projects
rmdir /s Projects :: Deletes folder + contents
Copies files from one place to another.
copy report.txt C:\Backup\
robocopy C:\Data D:\Backup /e /copyall
move oldname.txt newname.txt
Removes a file permanently.
del file.txt
del *.tmp :: Deletes all .tmp files
βοΈ System Information & Utilities
echoβ Print text to screenipconfigβ Show network configurationpingβ Test connectivitytasklistβ List running processestaskkillβ Kill a process by name or PIDsysteminfoβ Get system detailshostnameβ Displays computerβs hostname
echo Hello, World!
ipconfig
ipconfig /all
ipconfig /release && ipconfig /renew
ping google.com
tasklist
taskkill /im notepad.exe /f
systeminfo
hostname
π Searching & Filtering
findβ Search inside files or outputfindstrβ More advanced search (regex supported)- Pipes (
|) β Send output of one command into another
find "error" logfile.txt
findstr /i "warning" logfile.txt
ipconfig | find "IPv4"
π¦ Batch File Basics
- Create a script file (
.bator.cmd) to automate commands:
@echo off
echo Backing up Documents...
xcopy C:\Users\YourName\Documents D:\Backup /e /h /i
echo Done!
pause
π‘οΈ Useful Admin Tools
chkdskβ Check disk for errorssfcβ System File Checker (repairs system files)net userβ Manage local usersshutdownβ Shut down or restart computer
chkdsk C:
sfc /scannow
net user
net user NewUser MyPassword123 /add
shutdown /s /f /t 0 :: Shutdown immediately
shutdown /r /t 0 :: Restart immediately
β Quick Reference Cheat Sheet
Task | Linux Command | Windows CMD Equivalent |
Print current dir | pwd | cd (no args) |
List files | ls | dir |
Change dir | cd | cd |
Create folder | mkdir | mkdir / md |
Delete file | rm file | del file |
Delete folder | rm -r folder | rmdir /s folder |
Show network info | ifconfig/ip | ipconfig |
Kill process | kill | taskkill |