The Mac's shell is zsh, which is the same family as Linux. Forward slashes, case matters, and there is no Recycle Bin for rm.
| cmd, PowerShell | zsh | Notes |
|---|---|---|
dir | ls -la | ls alone is the short list. |
cd \, cd %USERPROFILE% | cd /, cd ~ | |
cls | clear, or ⌘K | |
copy, move, del, ren | cp, mv, rm, mv | rm is permanent. |
md, rd | mkdir, rmdir | rm -r folder removes a folder with contents. |
type file.txt | cat file.txt | less pages; open -e opens it in TextEdit. |
findstr | grep | grep -rn "text" . |
where | which | |
ipconfig | ifconfig, ipconfig getifaddr en0 | The second prints just your address. |
tasklist, taskkill /PID n | ps aux, kill n | top for a live view. |
explorer . | open . | open opens anything: files, URLs, apps. |
clip | pbcopy, pbpaste | cat file | pbcopy |
winget install x | brew install x | Homebrew, installed separately. --cask for GUI apps. |
systeminfo | system_profiler SPHardwareDataType | sw_vers for the macOS version. |
| Run as administrator | sudo command | Asks for your password; Touch ID can stand in. |
set, environment variables | export NAME=value in ~/.zshrc | echo $PATH |
C:\Program Files | /Applications | |
%APPDATA% | ~/Library/Application Support | Preferences and Logs sit next to it. |
Copy and paste inside Terminal are ⌘C and ⌘V. ⌃C cancels the running command, exactly like Windows Terminal. Dragging a file into the window pastes its path.