IT Cheat Sheet

Windows CMD Commands

File & Directory Operations

List Directory Contents
dir
Display files and folders in current directory
Change Directory
cd [path]
Navigate to specified directory
Create Directory
mkdir [name]
Create a new folder
Delete File
del [filename]
Remove a file
Copy File
copy [source] [dest]
Copy files to another location
Move File
move [source] [dest]
Move or rename files

System Information

System Info
systeminfo
Display detailed system configuration
IP Configuration
ipconfig /all
Show network adapter settings
Task List
tasklist
Display running processes
Kill Process
taskkill /IM [name] /F
Force terminate a process

PowerShell Commands

File & Directory Operations

List Items
Get-ChildItem
List files and folders (alias: ls, dir)
Set Location
Set-Location [path]
Change directory (alias: cd)
Create Item
New-Item -ItemType Directory -Name [name]
Create new folder or file
Remove Item
Remove-Item [path]
Delete files or folders
Copy Item
Copy-Item [source] [dest]
Copy files or folders
Move Item
Move-Item [source] [dest]
Move or rename items

System Management

Get Process
Get-Process
List running processes
Stop Process
Stop-Process -Name [name]
Terminate a process by name
Get Service
Get-Service
List all Windows services
Restart Service
Restart-Service [name]
Restart a Windows service
Get Computer Info
Get-ComputerInfo
Display system information
Test Connection
Test-Connection [host]
Ping a host (like ping command)

Linux/Bash Commands

File Operations

List Files
ls -la
List all files with details
Change Directory
cd [path]
Navigate to directory
Create Directory
mkdir -p [path]
Create directory (including parents)
Remove File/Dir
rm -rf [path]
Force remove files/folders recursively
Copy Files
cp -r [source] [dest]
Copy files/folders recursively
Move/Rename
mv [source] [dest]
Move or rename files

System Operations

Disk Usage
df -h
Show disk space in human-readable format
Directory Size
du -sh [path]
Show size of directory
Process List
ps aux
List all running processes
Kill Process
kill -9 [PID]
Force kill process by ID
System Info
uname -a
Display system information
Check Permissions
chmod 755 [file]
Set file permissions

Networking Commands

Network Diagnostics

Ping Host
ping [host]
Test connectivity to host
Trace Route
tracert [host]
Trace network path to host
DNS Lookup
nslookup [domain]
Query DNS records
Network Statistics
netstat -ano
Show active connections and ports
Flush DNS
ipconfig /flushdns
Clear DNS resolver cache
Release/Renew IP
ipconfig /release && ipconfig /renew
Refresh DHCP IP address

Git Commands

Common Operations

Clone Repository
git clone [url]
Clone a remote repository
Check Status
git status
Show working tree status
Stage Changes
git add .
Stage all changes
Commit Changes
git commit -m "[message]"
Commit staged changes
Push Changes
git push
Push commits to remote
Pull Changes
git pull
Fetch and merge remote changes

Common Solutions & Troubleshooting

Fix Network Connectivity Issues

  1. Reset TCP/IP stack: netsh int ip reset
  2. Reset Winsock: netsh winsock reset
  3. Flush DNS: ipconfig /flushdns
  4. Release and renew IP: ipconfig /release && ipconfig /renew
  5. Restart computer

Check Disk Health

  1. Run CHKDSK: chkdsk C: /f /r
  2. Check SMART status: wmic diskdrive get status
  3. SFC scan: sfc /scannow
  4. DISM repair: DISM /Online /Cleanup-Image /RestoreHealth

Windows Update Stuck

  1. Stop Windows Update service: net stop wuauserv
  2. Clear update cache: Delete contents of C:\Windows\SoftwareDistribution
  3. Restart service: net start wuauserv
  4. Run troubleshooter or try manual update

Reset Windows Password (Local Account)

  1. Boot from Windows installation media
  2. Press Shift+F10 for command prompt
  3. Replace Utilman: move C:\Windows\System32\Utilman.exe C:\Windows\System32\Utilman.exe.bak
  4. copy C:\Windows\System32\cmd.exe C:\Windows\System32\Utilman.exe
  5. Reboot, click accessibility icon, run: net user [username] [newpassword]

Windows 11 Bypass TPM/Secure Boot Requirement

  1. At setup screen, press Shift+F10
  2. Run: reg add HKLM\SYSTEM\Setup\LabConfig /v BypassTPMCheck /t REG_DWORD /d 1 /f
  3. Run: reg add HKLM\SYSTEM\Setup\LabConfig /v BypassSecureBootCheck /t REG_DWORD /d 1 /f
  4. Close command prompt and continue installation