← BACK TO HOME

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 conceptCommon Windows locationmacOS equivalentNotes
User profileC:\Users\jsmith/Users/jsmithThe current user’s home folder is also represented by ~.
User application data%APPDATA%~/Library/Application SupportPer-user app support files live under the user’s Library.
User preferencesRegistry HKCU, app config files~/Library/PreferencesOften stored as property list files, or plists.
Machine-wide app supportC:\ProgramData/Library/Application SupportShared app support files for all users.
Machine-wide preferencesRegistry HKLM, machine config/Library/PreferencesLocal computer preferences, often requiring administrator rights.
Installed appsC:\Program Files/ApplicationsMost GUI apps are .app bundles.
OS-owned filesC:\Windows/SystemTreat as Apple-owned. Do not use it as an admin staging area.
Command-line toolsC:\Windows\System32/bin, /sbin, /usr/bin, /usr/sbinSystem command locations.
Mounted drivesDrive letters, such as D:/VolumesExternal 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 content

Home 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 -la

The PowerShell equivalent uses the same macOS path, not a Windows path.

Get-Location
$HOME
Set-Location -Path $HOME
Get-ChildItem -Force

A common mistake is to translate only the command and not the path. This is wrong on macOS:

Set-Location C:\Users\jsmith\Desktop

This 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 $desktop

Applications 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/Contents

PowerShell 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.

LocationScopeCommon admin use
~/Library/PreferencesCurrent userPer-user preference files.
~/Library/Application SupportCurrent userPer-user app support data.
/Library/PreferencesLocal computerMachine-level preference files.
/Library/Application SupportLocal computerShared app support data.
/Library/LaunchDaemonsLocal computerRoot-context background jobs.
/Library/LaunchAgentsUser sessionsPer-user GUI-session jobs installed for all users.

Use ls when you need a quick terminal view.

ls -la ~/Library/Preferences
ls -la /Library/Preferences

Use 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 /Volumes

You 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" -print

To 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 -print

Spotlight 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, FullName

open 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" /Applications

That 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, FullName

The 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.