Terminal tricks cheat sheet
20 tricks for Windows. Type each command in PowerShell or Terminal. Read a command before you run it.
-
Battery health
powercfg /batteryreport
Saves an HTML report. Compare design capacity with full charge capacity.
-
What woke the PC
powercfg /lastwake
Names the device or timer that woke it from sleep.
-
Apps using the internet
netstat -nb
Open the terminal as administrator. App names show in [brackets].
-
Saved Wi-Fi password
netsh wlan show profile name="NAME" key=clear
Read "Key Content". Only for networks this PC has joined.
-
Devices on your Wi-Fi
arp -a
Lists addresses on your network. Ping the range first to see more.
-
Wi-Fi signal and channel
netsh wlan show interfaces
Shows signal strength, channel and speed of the current connection.
-
Router address
ipconfig | findstr Gateway
Then ping -n 20 that address to test your Wi-Fi.
-
What websites see of you
curl.exe ipinfo.io
Your public IP and rough location. Check that your VPN works.
-
Where a short link goes
curl.exe -sI https://bit.ly/YOUR-LINK
Read the Location line. The link is not opened.
-
Shutdown timer
shutdown /s /t 3600
Shuts down in 1 hour. Cancel with shutdown /a.
-
Pictures out of a Word file
tar -xf report.docx word/media
A .docx is a zip file. The pictures land in word\media.
-
Move apps to a new PC
winget export -o apps.json
On the new PC: winget import -i apps.json --ignore-unavailable
-
Firewall check
Get-NetFirewallProfile | select Name, Enabled
All three profiles should say True.
-
Who signed a program
Get-AuthenticodeSignature .\setup.exe | select Status, @{n='Signer';e={$_.SignerCertificate.Subject}}Valid is not the same as safe. Read the signer name.
-
Apps that are not responding
Get-Process | ? { -not $_.Responding } | select Name, IdOnly lists them. Nothing is closed.
-
Cheat sheet for any command
curl.exe cheat.sh/tldr:robocopy
Swap robocopy for any command name.
-
Dictionary in the terminal
curl.exe dict://dict.org/d:serendipity
Swap the word. Use m: instead of d: to check a spelling.
-
Clipboard history
Win+V
Paste anything you copied earlier. Turn it on the first time.
-
Restart a frozen display driver
Win+Ctrl+Shift+B
The screen flickers and your apps stay open.
-
Search one site on Google
site:reddit.com best budget laptop
Paste into Google, not the terminal. Add before:2024 for older posts.
Full steps and what each output means: usepromptup.com/terminalOutputs differ on every PC. Mac and Linux commands are in the posts.