A macOS user does not necessarily have the ability to install applications in
the system /Applications folder. This often is because they are not an
administrator on their machine. However, they can install applications in their
own user folder. This is typically /Users/<username>/Applications.
If a /Users/<username>/Applications folder does not exist, the user should
create it in the root of their home directory.
In the terminal, run the following command: mkdir ~/Applications, or create
the folder using Finder.
Applications that are packaged in .dmg files can be installed by mounting the
.dmg file and dragging the application to the user Applications folder. This is
done by opening the .dmg file in Finder, then dragging the application from
the .dmg file into the /Users/<username>/Applications folder.
Note
The .dmg file should be unmounted after the application is installed.
Important
Applications in package files (.pkg files) can't easily be installed to a user's
Applications folder. You can sometimes use a tool like
Pacifist to extract the application from the
package file and install it to the user's Applications folder.
Homebrew is a package manager for macOS. It is used to install applications and
software. It is a terminal application. Before using brew to install an
application, there are a few steps that must be completed beforehand.
The installation of Homebrew is outside the scope of this document, particularly if the person installing the application is not an administrator on the machine. See the Homebrew website for more information.
Set up Homebrew Cask Options
The following instructions are for ZSH, though they can easily be adapted for your shell of choice.
Run the following to set the HOMEBREW_CASK_OPTS environment variable:
echo 'export HOMEBREW_CASK_OPTS="--appdir=/Users/<username>/Applications"' >> ~/.zshrc
Note
You should use your actual username in place of <username>.
Then, run the following command to apply the changes to the current terminal
session: source ~/.zshrc
Now, the apps that are installed via brew will be installed in the user
Applications folder.
For example, to install the fantastic terminal application iTerm, run the
following command: brew install iterm2
iTerm will now be in the user's Applications folder.
Important
Applications installed via Homebrew Cask will NOT be updated automatically. The user must manually update the application, typically by the applications built-in update feature.
Warning
Some applications will ONLY work if they are installed in the system
Applications folder. One good example is 1Password.