To access the /var folder on a Mac, you use Finder’s Go > Go to Folder command and type /var. This works because /var is hidden by default in macOS, but the Go to Folder shortcut bypasses that hidden status. The folder contains system logs, temporary files, caches, and other dynamic data that the operating system and applications write to while running.
Why /var Is Hidden
macOS hides the /var directory (and its parent /) to prevent accidental modification by users. The /var folder is part of the Unix file system hierarchy that macOS inherits from BSD. It is reserved for variable data — files that change in size or content while the system is running. Apple hides it in the Finder because deleting or altering files inside /var can break system services, cause boot failures, or create security vulnerabilities. The hidden attribute is not a security measure; it is a usability choice. Anyone with administrator rights can still access /var using the methods described below.
How to Access /var in Finder
The fastest and safest way to open /var is through the Finder's Go to Folder dialog.
- Open a new Finder window (click the Finder icon in the Dock).
- Press Shift + Command + G (or click Go > Go to Folder in the menu bar).
- Type
/varin the text field. - Press Return or click Go.
The Finder will open a window showing the contents of /var. You can navigate to subfolders like /var/log or /var/tmp by typing their full paths instead. If you want to see hidden files and folders everywhere in Finder, you can press Command + Shift + . (period) while a Finder window is open. That toggle shows all hidden files, including /var, but it may also show many other hidden files you do not need.
Accessing /var from Terminal
If you prefer the command line, open Terminal (found in Applications > Utilities) and type:
cd /var
ls -la
The cd command changes your current directory to /var, and ls -la lists all files, including hidden ones. You can also open the folder in Finder from Terminal by typing open /var. Terminal does not hide /var, so you can navigate directly without any special flags. If you need to view system logs, you will often use cd /var/log and then ls to see files like system.log or install.log.
What You Will Find Inside /var
The /var folder contains several important subdirectories. Here are the most common ones:
- /var/log – System and application log files, such as
system.log,install.log, and crash reports. - /var/tmp – Temporary files that persist across reboots (unlike
/tmp, which is cleared on restart). - /var/db – Databases used by system services, such as the Spotlight index or the locate database.
- /var/folders – Per-user temporary files and caches created by applications (this is where many app caches are stored).
- /var/run – Contains system runtime information, like PID files for running processes.
- /var/spool – Print queues and other spooled data.
Most users will never need to touch these folders. They are managed automatically by macOS. If you are looking for a specific log file, the Console app (in Applications > Utilities) provides a safer and more readable interface than browsing /var/log directly.
Common Problems and Fixes
When accessing /var, users often encounter a few issues:
- “You don’t have permission to view it” – This error appears when you try to open certain subfolders like
/var/dbor/var/root. These are restricted to the root user. To view them, you would need to usesudoin Terminal, but that is not recommended unless you know exactly what you are doing. - Finder shows an empty window – If you go to
/varand see nothing, you may be looking at a different folder. Double-check the path. Also, some subfolders are empty by default. - Cannot find
/varin the sidebar – The sidebar does not show hidden folders. You must use Go to Folder every time. - Accidentally deleted a file in /var – If you delete a system file, you may experience errors. Restarting the Mac may recreate some files, but others are permanent. Do not delete anything unless you have a backup.
Safety and Precautions
Accessing /var is safe, but modifying its contents is not. The files in /var are owned by the system and the root user. Changing permissions, deleting log files, or moving folders can cause applications to malfunction. If you need to free up disk space, do not manually delete files in /var. Instead, use the built-in storage management tools (Apple menu > About This Mac > Storage) or third-party cleaning apps that are designed to handle system caches safely. If you must delete a specific file, such as a large log file, consider using Terminal with sudo and be absolutely certain of the filename. Always back up your Mac before making any system-level changes.
Alternatives to Browsing /var
For most tasks, you do not need to access /var directly. Here are safer alternatives:
- Console app – View logs and crash reports with a searchable interface.
- Activity Monitor – Check running processes and system resource usage without digging into
/var/run. - Disk Utility – Manage storage and check disk health without touching
/var. - Home folder – Most user-level caches and logs are in
~/Library/Logsand~/Library/Caches, which are easier to access and safer to manage.
Frequently Asked Questions
Why can’t I see /var in Finder?
Because /var is hidden by default. Use Go > Go to Folder (Shift+Command+G) and type /var to open it. You can also press Command+Shift+. to toggle hidden files, but that shows all hidden files, which can be overwhelming.
Is it safe to delete files in /var/log?
Deleting log files is generally safe because they are just text files. However, you should not delete them while the system is using them, and you may need administrator privileges. It is better to use the Console app to clear logs or let macOS manage them automatically.
What is the difference between /var and /tmp?
/tmp is cleared on every reboot, while /var/tmp persists across reboots. Both are for temporary files, but /tmp is more volatile. Applications use /var/tmp for data that must survive a restart.
Do I need to be an administrator to access /var?
No. Any user can open /var and browse most subfolders. However, some subfolders like /var/db or /var/root require root privileges. To read those, you would need to use sudo in Terminal, which requires an administrator password.
Can I move /var to another drive to save space?
Technically you can create a symlink, but it is extremely risky and can break system updates and services. Do not attempt this unless you are a system administrator with a full backup and a clear rollback plan.
Why does /var/folders have random names?
Those are per-user temporary directories with unique identifiers (UUIDs). macOS creates them for each user session to isolate temporary files and caches. You should not modify or delete them manually.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Unbox ASMR Codes: What They Are & How to Use5.00 min/km
- Repurposed Old Motorola Phone for Homelab?
- How to Evaluate AI Vendors for Data Security, Privacy & Compliance
- Best Ergonomic Mouse: Top Picks & Buying Guide
- Captions in Google Slides: How to Add & Format Them
- Use Mac Type in Japanese? Full Guide