Before you install, make sure that your Mac is connected to the Internet, which allows installation of both macOS and any firmware updates available for your Mac.
If your Mac is enrolled in the Device Enrollment Program (DEP), you can install macOS using the Software Update commands.
If you're installing from and to your computer's startup disk, you can use the startosinstall command, which is in the Contents/Resources directory of the macOS installer. For more information about startosinstall, add the --usage flag to the command. For example, you can:
- Add the
--installpackageflag to specify other packages to install after macOS. To build these packages, use theproductbuild(1)command. - Add the
--eraseinstallflag to erase your current startup disk first—if you're installing macOS High Sierra 10.13.4 or later and the volume is part of an APFS container. All volumes in that container are erased during this process.
These other installation methods work whether or not macOS is currently installed on the target volume:
Apple doesn't recommend or support monolithic system imaging as an installation method, because the system image might not include model-specific information such as firmware updates.