The Shell Crossover
The Shell Crossover, Part 2: Finding Your Way Around macOS from the Terminal
Map Windows filesystem and PowerShell navigation concepts to macOS paths, Library folders, Volumes, zsh commands, and PowerShell 7 on the Mac.
A Windows administrator can usually understand a new system once the filesystem makes sense. On Windows, that mental model often starts with C:\, C:\Users, C:\Program Files, %APPDATA%, and the registry. On macOS, the same operational questions exist, but the answers live in different places.
This article maps the macOS filesystem and terminal navigation model to concepts you already know from Windows and PowerShell.
The short map
| Windows concept | Common Windows location | macOS equivalent | Notes |
|---|---|---|---|
| User profile | C:\Users\jsmith | /Users/jsmith | The current user’s home folder is also represented by ~. |
| User application data | %APPDATA% | ~/Library/Application Support | Per-user app support files live under the user’s Library. |
| User preferences | Registry HKCU, app config files | ~/Library/Preferences | Often stored as property list files, or plists. |
| Machine-wide app support | C:\ProgramData | /Library/Application Support | Shared app support files for all users. |
| Machine-wide preferences | Registry HKLM, machine config | /Library/Preferences | Local computer preferences, often requiring administrator rights. |
| Installed apps | C:\Program Files | /Applications | Most GUI apps are .app bundles. |
| OS-owned files | C:\Windows | /System | Treat as Apple-owned. Do not use it as an admin staging area. |
| Command-line tools | C:\Windows\System32 | /bin, /sbin, /usr/bin, /usr/sbin | System command locations. |
| Mounted drives | Drive letters, such as D: | /Volumes | External disks, DMGs, and network shares appear here. |
| Temp data | %TEMP% | /tmp, /private/tmp | /tmp is a path into /private/tmp. |
The most important pattern is the distinction between the user Library and the local computer Library.
~/Library Per-user data for the current user
/Library Local computer data shared across users
/System Apple-controlled operating system contentHome folders and the tilde shortcut
The current user’s home folder is available through ~ in zsh and $HOME in zsh or PowerShell.
pwd
echo "$HOME"
cd ~
ls -laThe PowerShell equivalent uses the same macOS path, not a Windows path.
Get-Location
$HOME
Set-Location -Path $HOME
Get-ChildItem -ForceA common mistake is to translate only the command and not the path. This is wrong on macOS:
Set-Location C:\Users\jsmith\DesktopThis is the macOS form:
Set-Location -Path "/Users/jsmith/Desktop"For scripts, avoid hard-coding the username. Prefer $HOME or a discovered home path.
$desktop = Join-Path -Path $HOME -ChildPath "Desktop"
Get-ChildItem -Path $desktopApplications are usually bundles
On Windows, C:\Program Files\Vendor\App\app.exe usually points to an executable file. On macOS, many applications appear as one item ending in .app, but that item is a directory bundle.
ls -ld /Applications/Safari.app
ls /Applications/Safari.app/ContentsPowerShell sees the same structure.
Get-Item -LiteralPath "/Applications/Safari.app"
Get-ChildItem -LiteralPath "/Applications/Safari.app/Contents"That bundle layout matters when scripting. Copying, deleting, or inspecting an application can affect many files under a single .app directory.
The Library folders are where admins spend time
For endpoint management work, the Library folders are more important than /System.
| Location | Scope | Common admin use |
|---|---|---|
~/Library/Preferences | Current user | Per-user preference files. |
~/Library/Application Support | Current user | Per-user app support data. |
/Library/Preferences | Local computer | Machine-level preference files. |
/Library/Application Support | Local computer | Shared app support data. |
/Library/LaunchDaemons | Local computer | Root-context background jobs. |
/Library/LaunchAgents | User sessions | Per-user GUI-session jobs installed for all users. |
Use ls when you need a quick terminal view.
ls -la ~/Library/Preferences
ls -la /Library/PreferencesUse PowerShell when you want object handling, filtering, and formatting.
Get-ChildItem -Path "$HOME/Library/Preferences" -Filter "*.plist" |
Sort-Object LastWriteTime -Descending |
Select-Object -First 10 Name, LastWriteTime, Length/Volumes replaces drive-letter thinking
macOS does not assign drive letters. Mounted volumes appear under /Volumes.
ls /VolumesYou will see external disks, mounted disk images, and some network shares in this location. This is especially important when working with .dmg files because mounting a disk image normally creates a volume under /Volumes.
hdiutil attach ./Example.dmg
ls /Volumes
hdiutil detach "/Volumes/Example"In PowerShell, the same paths are valid.
Get-ChildItem -Path "/Volumes"Finding files without assuming a drive root
On Windows, it is common to search from C:\. On macOS, searching from / can cross system paths, mounted volumes, and protected areas. Start with the smallest useful scope.
find "$HOME" -name "*.plist" -printTo avoid descending into every app bundle or every mounted volume, scope your searches deliberately.
find /Library/Preferences -name "*.plist" -print
find /Applications -type d -name "*.app" -prune -printSpotlight metadata search can also be useful when the index has the data you need.
mdfind 'kMDItemFSName == "Safari.app"'PowerShell gives you a familiar object pipeline.
Get-ChildItem -Path "/Library/Preferences" -Filter "*.plist" -File
Get-ChildItem -Path "/Applications" -Filter "*.app" -Directory |
Select-Object Name, FullNameopen is not Start-Process, but it feels close
The macOS open command asks Launch Services to open a file, folder, URL, or app the way Finder would.
open /Applications
open -a "Safari" "https://admincrossover.dev"
open "$HOME/Library/Preferences"From PowerShell, you can call it as a native command.
& open "/Applications"
& open -a "Safari" "https://admincrossover.dev"Use open for interactive workflows. Use direct command paths for automation.
Inspecting files and directories
Some macOS command-line tools use BSD-style options rather than GNU/Linux options. stat is one of the first places Windows administrators notice this.
stat -f "%Sp %Su %Sg %N" /ApplicationsThat returns the mode, owner, group, and name. PowerShell can call the same command when the native output is what you need.
& stat -f "%Sp %Su %Sg %N" "/Applications"For size inspection, du is usually faster than trying to visually judge a directory tree. Avoid assuming GNU-style examples will work on stock macOS. The following pattern uses kilobytes and numeric sorting so it works with the BSD userland that ships with macOS.
du -sk /Applications/* 2>/dev/null | sort -n | awk '{printf "%s KB\t%s\n", $1, $2}'If you install GNU coreutils separately, you may see examples that use human-readable sorting. Do not make that a dependency in fleet scripts unless you also manage that dependency.
PowerShell can inspect objects, but native tools are often better for Unix filesystem metadata.
Get-ChildItem -Path "/Applications" -Directory |
Select-Object Name, FullNameThe operating rule
Do not try to make macOS look like Windows. Translate the administrative intent instead.
When your intent is navigation, use cd, pwd, ls, find, mdfind, and open. When your intent is object filtering, reports, and repeatable automation, PowerShell 7 remains valuable. The filesystem path is still macOS either way.