Windowsopen tab →
System info
Windows version and build, a full system summary, and the detailed System Information window.
winver
systeminfo
msinfo32
Repair system files
Admin terminal. Run DISM first to repair the component store, then sfc to fix system files with it. Reboot afterwards if sfc fixed anything.
dism /online /cleanup-image /restorehealth
sfc /scannow
Classic right-click menu
Brings back the Windows 10 right-click menu. Restart Explorer or sign out to see it. The second command undoes it.
reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
reg.exe delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f
taskkill /f /im explorer.exe & start explorer.exe
Allow long file paths
Removes the 260-character path limit. Run in elevated cmd, then reboot.
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
Add High performance power plan
Adds the High performance plan when Power Options doesn't show it (common on laptops). Pick it in Power Options, or copy its new GUID from /list and use /setactive.
powercfg -duplicatescheme 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
powercfg /list
powercfg /setactive <GUID>
Battery report
Saves an HTML report of battery health and wear in the current folder. Laptops only.
powercfg /batteryreport
Restart into BIOS/UEFI
Reboots straight into firmware setup. Admin terminal. On BitLocker drives, suspend it first (see BitLocker).
shutdown /r /fw /t 0
Reset networking
Flush DNS and renew the IP address first; winsock and IP resets are the bigger hammer and need a reboot. Admin terminal.
ipconfig /flushdns
ipconfig /release
ipconfig /renew
netsh winsock reset
netsh int ip reset
What is using a port
Find the process listening on a port. The first line shows the PID in the last column; the second names that PID. The third is the PowerShell version.
netstat -ano | findstr :<port>
tasklist /fi "PID eq <pid>"
Get-NetTCPConnection -LocalPort <port> | Select-Object OwningProcess, State
Install and update apps (winget)
Windows' built-in package manager. Search for an app, install it by its Id, or update everything at once.
winget search <name>
winget install --id <id> -e
winget upgrade --all
Rename a local user
Renames the account only; the C:\Users folder keeps its old name. Admin PowerShell. netplwiz and lusrmgr.msc open the user account windows.
Rename-LocalUser -Name "<old>" -NewName "<new>"
netplwiz
lusrmgr.msc
Join a workgroup and rename the PC
Admin PowerShell. Replace <WORKGROUP> and <NEWNAME>; the changes apply after the restart.
Add-Computer -WorkGroupName "<WORKGROUP>"
Rename-Computer -NewName "<NEWNAME>"
Restart-Computer
BitLockeropen tab →
Check status
Is the drive encrypted, how far along, is protection on. Admin terminal.
manage-bde -status C:
Get-BitLockerVolume
Back up the recovery key (do this first)
Shows the 48-digit recovery password. Save it before any reset, BIOS update or decrypt. Also at account.microsoft.com/devices/recoverykey.
manage-bde -protectors -get C:
Suspend for one reboot
Pauses BitLocker for a BIOS or firmware update without decrypting. Comes back on by itself after the reboot.
manage-bde -protectors -disable C: -RebootCount 1
Suspend-BitLocker -MountPoint "C:" -RebootCount 1
Resume protection
Turns a suspended drive back on now.
manage-bde -protectors -enable C:
Resume-BitLocker -MountPoint "C:"
Turn off (decrypt)
Fully decrypts the drive. Runs in the background and takes a while; watch it with Check status.
manage-bde -off C:
Recovery environment (WinRE)
Reset this PC and Advanced startup need WinRE. /info shows whether it is enabled; /enable turns it on.
reagentc /info
reagentc /enable
Cloud Reset
Run the reset from recovery, not from Windows: Troubleshoot → Reset this PC → Cloud download. The command restarts straight into Advanced startup.
shutdown /r /o /t 0
Unlock a locked drive
From the WinRE command prompt, when Windows asks for the key or the drive won't open. Replace <key> with the 48-digit password.
manage-bde -unlock C: -RecoveryPassword <key>
Chromeopen tab →
About
Lists all available internal Chrome pages.
chrome://about
Accessibility
Accessibility mode and the accessibility tree for each tab.
chrome://accessibility
Bluetooth Internals
Debug Bluetooth adapters and devices.
chrome://bluetooth-internals
Bookmarks
Manage and organize bookmarks.
chrome://bookmarks
Clear browsing data
Clear cache, cookies or history for a chosen time range.
chrome://settings/clearBrowserData
Components
Lists installed browser components and allows updates.
chrome://components
Crashes
Shows recent browser crash reports.
chrome://crashes
Credits
Shows open-source software credits used by Chrome.
chrome://credits
Device Log
Logs device and hardware events.
chrome://device-log
Discards
Shows which tabs Chrome has frozen or unloaded to save memory. You can discard tabs by hand.
chrome://discards
DNS
Clear Chrome's DNS cache: press "Clear host cache", then "Flush socket pools" on the sockets page.
chrome://net-internals/#dns
chrome://net-internals/#sockets
Downloads
Displays your downloaded files.
chrome://downloads
Extensions
Manages installed browser extensions.
chrome://extensions
Flags
Lets you enable or disable experimental features.
chrome://flags
GPU
Displays graphics and GPU process information.
chrome://gpu
Histograms
Displays internal performance and metrics histograms.
chrome://histograms
History
Shows your browsing history.
chrome://history
HSTS rules
View or delete a site's HTTPS-only (HSTS) rule. Fixes "this site can only be reached over HTTPS" on local or test hosts.
chrome://net-internals/#hsts
Inspect
Used for inspecting pages, extensions, and background processes.
chrome://inspect
Management
Shows whether the browser is managed by an organization, and what it's allowed to see.
chrome://management
Media Internals
Shows detailed media playback and streaming info.
chrome://media-internals
Net Export
Record a network log to a file for troubleshooting. Replaces the old net-internals event viewer.
chrome://net-export
Net Internals
Provides network diagnostic and debugging tools.
chrome://net-internals
Password Manager
View, edit or export saved passwords.
chrome://password-manager
Policy
Displays Chrome’s managed policies and configurations.
chrome://policy
Process Internals
Shows how sites are split into separate processes.
chrome://process-internals
Quota Internals
Shows storage quota usage and settings for origins.
chrome://quota-internals
Restart
Restarts Chrome and reopens your tabs.
chrome://restart
Safe Browsing
Safe Browsing status and recent checks.
chrome://safe-browsing
Sandbox
Displays Chrome’s security sandbox status.
chrome://sandbox
Service Workers
List, stop or unregister service workers. Fixes sites stuck on an old version.
chrome://serviceworker-internals
Settings
Opens Chrome’s main settings page.
chrome://settings
Site permissions
Camera, microphone, location and pop-up permissions for each site.
chrome://settings/content
Sync Internals
Displays Chrome Sync status and data diagnostics.
chrome://sync-internals
System
Shows system information and environment details.
chrome://system
Tracing
Captures and analyzes performance traces.
chrome://tracing
USB Internals
Debug and inspect USB device connections.
chrome://usb-internals
Version
Shows detailed information about your Chrome version.
chrome://version
WebRTC Internals
Provides details and logs for WebRTC connections.
chrome://webrtc-internals
Linux Servicesopen tab →
Update the system
Debian/Ubuntu. Refresh the package list, install updates, then remove packages nothing needs any more.
sudo apt update && sudo apt upgrade -y
sudo apt autoremove
Restart a service
Restart a systemd service after changing it. Run daemon-reload first if you edited the .service file itself; status and the journal show whether it came back up. Replace <service> with the unit name.
sudo systemctl daemon-reload
sudo systemctl restart <service>
sudo systemctl status <service> --no-pager
journalctl -u <service> -n 50 --no-pager
Start, stop and list services
Enable a service at boot and start it now, or the reverse. The last three list running services, failed ones, and timers.
sudo systemctl enable <service> --now
sudo systemctl disable <service> --now
systemctl list-units --type=service --state=running
systemctl --failed
systemctl list-timers
Follow a service's log
Watch new log lines live (Ctrl+C to stop), or show the last hour.
journalctl -u <service> -f
journalctl -u <service> --since "1 hour ago" --no-pager
What is listening on ports
Lists open TCP/UDP ports and the process behind each. sudo shows process names for every user.
sudo ss -tulpn
Disk space
Free space per drive, the biggest items in the current folder (largest last), the drives and partitions with their filesystems, and inode use (a disk can be full of small files with space left).
df -h
du -sh * | sort -h
lsblk -f
df -i
Memory, CPU and uptime
Free memory and swap, how long the machine has been up with its load average, CPU count, kernel version, and a live process view (q to quit).
free -h
uptime
nproc
uname -a
top
Create a sudo user
Run as root on a fresh Debian or Ubuntu machine. Creates a user, gives them sudo rights, and switches to them. The first line does all three; the rest are the same steps one at a time. Replace thomas with the new user's name.
adduser thomas && usermod -aG sudo thomas && su - thomas
adduser thomas
usermod -aG sudo thomas
su - thomas
Run a Streamlit app
Starts a Streamlit app by hand on the given port, outside systemd. Run it from the app's folder; Ctrl+C stops it.
streamlit run app.py --server.port 8562
Linux Networkingopen tab →
Addresses and routes
One line per interface with its IP addresses, then the routing table (the default line is the gateway).
ip -br a
ip r
Test connectivity
ping checks a host answers; traceroute shows each hop on the way and where it stops.
ping -c 4 <host>
traceroute <host>
DNS lookup
Full answer, just the address, the answer from a specific DNS server, and which DNS servers this machine uses.
dig <name>
dig +short <name>
dig @1.1.1.1 <name>
resolvectl status
Test a web server
-I shows only the response headers (status code, redirects); -v shows the whole exchange including TLS.
curl -I https://<host>
curl -v https://<host>
Is a port open
Tries to connect to one port and reports success or failure without sending anything.
nc -zv <host> <port>
ZFSopen tab →
Pool health
-x prints only pools with problems ("all pools are healthy" otherwise). The full status shows each disk and any errors; list shows size and free space.
zpool status -x
zpool status
zpool list
Datasets and space
Every dataset with used and available space; -o space breaks usage down by snapshots and children; the last shows how well compression is working.
zfs list
zfs list -o space
zfs get compressratio
Scrub
Reads every block and repairs from redundancy. Start one, check progress, or stop it (-s). Monthly is typical.
zpool scrub <pool>
zpool status <pool>
zpool scrub -s <pool>
Snapshots
Take a snapshot, list them, roll a dataset back to one (later snapshots must be removed first), or delete one.
zfs snapshot <pool>/<dataset>@<name>
zfs list -t snapshot
zfs rollback <pool>/<dataset>@<name>
zfs destroy <pool>/<dataset>@<name>
Replace a disk
Swap a failed or old disk; status shows the resilver progress. Use /dev/disk/by-id names so the pool survives device reordering.
zpool replace <pool> <old-disk> <new-disk>
zpool status <pool>
Import and export a pool
Export before moving disks to another machine. Import with no name lists pools found on attached disks.
zpool import
zpool import <pool>
zpool export <pool>
Proxmoxopen tab →
List guests
Containers (pct) and VMs (qm) with their ID, status and name. Run on the Proxmox host.
pct list
qm list
Start, stop or reboot a container
shutdown asks the container to stop cleanly; stop pulls the plug when it hangs.
pct start <id>
pct shutdown <id>
pct reboot <id>
pct stop <id>
Enter a container
Opens a root shell inside a running container; exit to leave.
pct enter <id>
Start or stop a VM
shutdown is a clean stop, stop is forced. unlock clears a lock left behind by a failed backup or migration.
qm start <id>
qm shutdown <id>
qm stop <id>
qm unlock <id>
Back up a guest
Backs up a container or VM to a storage while it keeps running.
vzdump <id> --storage <storage> --mode snapshot
Host status
Storage usage, cluster and quorum state, and the versions of every Proxmox package.
pvesm status
pvecm status
pveversion -v
Update Proxmox
Proxmox needs dist-upgrade, not plain upgrade, so kernel and package changes come in together. Reboot after a new kernel.
apt update && apt dist-upgrade
SSHopen tab →
Create an SSH key
Makes a key pair in ~/.ssh: id_ed25519 is private, id_ed25519.pub is public. Skip this if you already have one. Works on Windows, Linux and macOS.
ssh-keygen -t ed25519
Copy your key to a server (Windows)
Windows has no ssh-copy-id. This adds your public key to the server's authorized_keys so you can log in without a password. First line for cmd, second for PowerShell.
type %USERPROFILE%\.ssh\id_ed25519.pub | ssh <user>@<host> "umask 077; mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys"
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh <user>@<host> "umask 077; mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys"
Copy your key to a server (Linux/macOS)
Adds your public key to the server's authorized_keys so you can log in without a password.
ssh-copy-id -i ~/.ssh/id_ed25519.pub <user>@<host>
Connect and troubleshoot
Log in, use a non-standard port, or add -v to see why a login fails (wrong key, refused, timeout).
ssh <user>@<host>
ssh -p <port> <user>@<host>
ssh -v <user>@<host>
Shortcut in ~/.ssh/config
Save a host's name, user, port and key so `ssh myserver` is enough. Add these lines to ~/.ssh/config.
Host myserver
HostName <host>
User <user>
Port 22
IdentityFile ~/.ssh/id_ed25519
Copy files
scp copies a file or folder (-r) to a server; rsync resumes and shows progress, which suits big folders.
scp <file> <user>@<host>:<path>
scp -r <folder> <user>@<host>:<path>
rsync -avP <folder> <user>@<host>:<path>
Port tunnel
Reach a port on the server through SSH. Example: the server's web page at port 80 opens on your PC at localhost:8080.
ssh -L 8080:localhost:80 <user>@<host>
Fix key permissions
SSH ignores keys whose files anyone else can read. Run on the server when key login falls back to a password.
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
chmod 600 ~/.ssh/id_ed25519
Remove an old host key
Fixes "REMOTE HOST IDENTIFICATION HAS CHANGED" after a server is reinstalled or its IP is reused.
ssh-keygen -R <host>
Colored bash prompt
Red user, yellow host, blue path. Add the first two lines to the end of ~/.bashrc, then run the last line to load it now.
#Colored Prompt
PS1='\[\e[1;31m\]\u\[\e[0m\]@\[\e[1;33m\]\h\[\e[0m\]:\[\e[1;34m\]\w\[\e[0m\]\$ '
source ~/.bashrc
MySQLopen tab →
Log in
Open the MySQL shell. On Ubuntu, root usually logs in with sudo and no password.
mysql -u root -p
sudo mysql
Create a database and user
Creates a database and a user that has full rights on it. Replace <database>, <user> and <password>.
CREATE USER IF NOT EXISTS '<user>'@'localhost' IDENTIFIED BY '<password>'; CREATE DATABASE IF NOT EXISTS `<database>` CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; GRANT ALL PRIVILEGES ON `<database>`.* TO '<user>'@'localhost';
List databases, users and rights
See what exists and who can access what.
SHOW DATABASES;
SELECT user, host FROM mysql.user;
SHOW GRANTS FOR '<user>'@'localhost';
Change a password
Sets a new password for an existing user.
ALTER USER '<user>'@'localhost' IDENTIFIED BY '<new password>';
Back up and restore
Run from the shell, not inside mysql. The first command dumps one database to a .sql file without locking it; the second loads that file back.
mysqldump -u root -p --single-transaction <database> > <database>.sql
mysql -u root -p <database> < <database>.sql
Delete a database and user
Permanent. Back up first.
DROP DATABASE `<database>`;
DROP USER '<user>'@'localhost';