How to Use Invisible Files in macOS – AppleInsider

0
How to Use Invisible Files in macOS – AppleInsider

Hidden files in macOS Ventura


AppleInsider may earn an affiliate commission on purchases made through links on our site.

There are many hidden files and folders in macOS, which you can always access if you know the method. Here’s how to see invisible files.

There are many additional features beyond basic Finder usage. Mac users love their machines for their clean, simple design, ease of use, and minimalist user interface, but beneath all that elegance lies a powerful UNIX operating system in its own right.

UNIX was invented at Bell Labs in 1969 and was originally designed to run on mainframe computers with time-sharing terminals. In 1997, when Steve Jobs returned to Apple, the company decided to upgrade the Mac to a new modern UNIX system based on the NeXTSTEP operating system, which was developed at Steve’s other company, NeXT.

NeXTStep and Mac_OS_9 were combined to create Mac OS X, which Apple shipped in 2000 – now simply called macOS.

The original UNIX file system was complex, containing hundreds of directories, thousands of small programs, and a variety of other tools, including a terminal shell and scripting languages ​​- almost all visible and systematically accessible to the user. ‘user.

Today, on macOS, most of the original UNIX system is still present but hidden from the user, who rarely needs to see it.

There are various reasons why you might want to show the invisible parts of the file system on your Mac. These include installing third-party UNIX tools, installing developer tools and packages, modifying login scripts, removing hidden preferences, or deleting files installed by third-party installers from macOS.

You can also hide files and folders in invisible locations for security reasons.

Before we dive into how to show all invisible files on your Mac, be aware that moving, deleting, or renaming invisible parts of the file system can make your Mac unbootable, so be careful. Accessing invisible parts of the operating system is not recommended unless you know what you are doing.

Toggle invisible files in Finder

The best and easiest way to enable or disable invisible files in macOS Ventura Finder is to press Command-Shift-period keys together.

You can also open a Terminal window and type:

default write com.apple.Finder AppleShowAllFiles true

Then press Come back. This tells Finder to show all files in the file system.

You will need to restart Finder for the changes to take effect. To do this, you can either Force Quit and relaunch the Finder in the Force Quit window on the Apple menu, or right-click or Ctrl-Option-click the Finder icon in the Dock and select “Relaunch” in the context menu.

When you force quit the Finder, all running Finder operations, such as file copies, are immediately canceled.

In Terminal, you can disable invisible files later with the same Terminal command but with the value set to false:

defaults write http://com.apple.Finder AppleShowAllFiles false

Once you show the invisible files and relaunch the Finder, you now have full access to all parts of the file system on all mounted volumes on all storage devices on your Mac.

The version of UNIX on which macOS is based is called Berkeley Sockets Distribution, which was itself an amalgamation of AT&T System V UNIX and a TCP/IP socket layer developed at the University of California, Berkeley in early 1980s. When NeXT was developing NeXTStep, it chose FreeBSD as the core of the system because of its networking capabilities.

When Apple bought NeXT in 1997, it tweaked the core operating system slightly and called it Darwin – which is still the basis of macOS and iOS today. At their core, these operating systems are complete and powerful UNIX systems. Darwin is entirely UNIX based.

If you open your Mac’s startup disk, after viewing invisible files, you’ll see additional folders beyond the standard Applications, System, Library, and Users folders.

The main invisible folders are:

Apple chose to move 3 of these folders (etc, tmp and var) into a new folder called private.

Therefore, the etc, tmp, and var folders in the root of your startup disk are really just aliases. Most single-file UNIX binary tools are stored in bin, sbin, or usr/local/bin, or in usr/local/sbin

To complicate matters, there are also directories usr/local/etc and usr/local/var.

There are 3rd party Mac UNIX tool managers such as Homebrew which handle the installation/removal of additional 3rd party UNIX tools in these locations for you.

There is also the traditional UNIX home folder in the root of your startup disk, but in macOS it is not used like in most other UNIX systems because Apple decided to move all users’ home folders local to the macOS Users folder only.

Another important invisible folder at the root of the startup disk is Volumes. Following the traditional layouts of the BSD storage subsystem, Volumes contains all UNIX mount points for all volumes mounted on your Mac.

The details of the system and technology mount points are quite complex and beyond the scope of this article.

In modern versions of macOS, Finder windows now also display a small eject arrow icon next to each mounted volume in the Volumes folder. Tap the eject icon to eject the volume next to it.

You can also view the creation date and last modification date of each volume in the Volumes window.

Make files and folders invisible normally

When hidden files are disabled in the Finder, you can make any file or folder invisible by preceding its name with a period. This hides the item and you won’t be able to access it again until you re-enable invisible files or access it through the terminal.

For example, storage volumes on your Mac store their custom Finder icons, if any, in a file at the root of the volume named .VolumeIcon.icns. The Finder reads this file, if present, when it mounts the volume and uses the icons it finds there as the volume’s desktop icon.

If you remove VolumeIcon.icns, Finder uses a generic system icon for each volume. When Invisible Files is disabled, you don’t see the VolumeIcon.icns file, but it’s there nonetheless. .dmg disk images use a similar scheme for their mounted volumes.

Home Folder, Preferences and App Support

When you enable Invisible Files in Finder, you’ll also notice a slew of invisible files and folders in your home folder. Third-party tools may store settings here in invisible files or folders, but macOS also has a few of its own system configuration files in the user’s home folder:

  • .cups (UNIX printing)
  • .ssh (public and private SSH keys)
  • .zsh_sessions (zsh shell session records)
  • .bash_profile
  • .bash_rc
  • .profile (login setup scripts)
  • .inputrc.sh (more info on Terminal session)
  • .zlogin
  • .zsh_history and .zshrc (more login scripts).

When your Mac starts up and you log in, or when you log out and log back in, the system runs whatever is stored in bash_profile, .bash_rc, .profile, .inputrc.sh, .zlogin, and .zshrc.

Preferences are stored in 3 places in the macOS file system:

  • /System/Library/Preferences
  • /Library Preferences
  • ~/Library/Preferences

In UNIX, the “~” character signifies the user’s home folder.

Most preference files are normally visible, but some are invisible and can only be viewed in the Finder by enabling invisible files. The same goes for the Application Support folders located in /Library/Application Support and ~/Library/Application Support. Most third-party developers and Apple store additional files needed by apps in these 2 locations.

Sometimes when viewing your System, Library, or Home folder in Finder with Invisible Files enabled, you will see folders with a small badge in the lower right corner – these are system restricted folders and should not be tampered with :

If you try to double-click on one of these folders, Finder will throw an alert that you don’t have permission to open it.

Do not change the permissions on these folders to view their contents unless you know exactly what you are doing. Setting incorrect permissions on system-restricted folders can make your Mac unbootable and prevent Finder from working properly.

You can view and change each folder’s permissions in its Finder Get Info window or in Terminal, but be extremely careful. UNIX file permissions are fickle, and it only takes one mistake to stop your Mac from working properly.

UNIX is a very powerful operating system, and we’ve barely scratched the surface. By using invisible files and folders in the Finder, you can do things on your Mac that you can’t otherwise.

T
WRITTEN BY

Related posts