installer

From RaySoft

The installer command is used to install Mac OS X installer packages to a specified domain or volume.[1]

Documentation

Syntax

installer [PARAMETER ...] -package PACKAGE

Parameters

-pkg PACKAGE, -package PACKAGE
The installer command installs a single PACKAGE per invocation, which is specified with the -package parameter (-pkg is accepted as a synonym). It may be either a single package or a metapackage. In the case of the metapackage, the packages which are part of the default install will be installed unless disqualified by a package's check tool(s).
-tgt VOLUMNE, -target VOLUMNE
The target VOLUMNE is specified with the -target parameter (-tgt is accepted as a synonym). It must already be mounted when the installer command is invoked.

Example

Install Pandoc
curl --output 'pandoc-2.2.pkg' \
     'https://github.com/jgm/pandoc/releases/download/2.2/pandoc-2.2-macOS.pkg'

sudo installer -package 'pandoc-2.2.pkg' -target '/'

References

  1. man 8 'installer'