Linux to Windows Command Cheat Sheet
After 25 years of working primarily in Linux, I'm now transitioning more of my workflow to Windows 11. Stability, accessibility, and low-maintenance usability matter — especially when time and energy are limited. This guide compares familiar Linux commands with their Windows CMD and PowerShell counterparts to help streamline your shift and keep you productive with minimal friction.
Linux | Windows CMD | PowerShell | Description |
---|---|---|---|
ls | dir | Get-ChildItem | List directory contents |
cd /home/user/Downloads | cd C:\Users\user\Downloads | Set-Location | Change directory |
pwd | cd | Get-Location | Print current directory |
cp file1 file2 | copy file1 file2 | Copy-Item file1 file2 | Copy file |
mv file newloc/ | move file newloc\ | Move-Item | Move file |
rm file | del file | Remove-Item | Delete file |
touch file.txt | echo. > file.txt | New-Item file.txt -ItemType File | Create empty file |
mkdir mydir | mkdir mydir | New-Item mydir -ItemType Directory | Make directory |
rmdir mydir | rmdir mydir | Remove-Item mydir -Recurse | Remove directory |
cat file.txt | type file.txt | Get-Content file.txt | View file contents |
nano file.txt | (not native) | Use Notepad or editor | Edit file |
top | tasklist | Get-Process | View running processes |
kill 1234 | taskkill /PID 1234 | Stop-Process -Id 1234 | Kill process by PID |
df -h | wmic logicaldisk get size,freespace,caption | Get-PSDrive | Disk usage info |
free -h | systeminfo | Get-ComputerInfo | Memory info |
sudo apt update | (n/a) | winget upgrade | Update packages |
apt install curl | (n/a) | winget install curl | Install software |
sha256sum file.iso | certutil -hashfile file.iso SHA256 | Get-FileHash | Check SHA256 hash |
ping example.com | ping example.com | Test-Connection example.com | Ping a host |
ip a | ipconfig | Get-NetIPConfiguration | IP/network info |