Access to terminal and console in the Setup Assistant
To open Terminal or Console while you’re in the Setup Assistant of macOS, simply use the following keyboard shortcuts:
- Terminal: CTL + OPTION + CMD + T
- Console: CTL + OPTION + CMD + C
When you open Terminal, it runs under the _mbsetupuser account, which is the default user used by the Setup Assistant.
Utilities of terminal in the Setup Assistant
Once Terminal is open, you can perform any action that doesn’t require elevated privileges. One of the most common utilities is obtaining the machine’s IP address while in the Setup Assistant using commands like ifconfig
or networksetup. networksetup.
Elevate permissions in terminal
_mbsetupuser
, actions requiring root permissions cannot be performed. However, if you enable the root user before starting the Setup Assistant, you can elevate your permissions and perform more advanced actions.
Enable Root on an unconfigured machine
- Start your machine in single-user mode.
- Mount the startup drive as read/write: /sbin/mount -uw /
/sbin/mount -uw /
- Enable OpenDirectory:
launchctl
load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist - Set the root password: passwd root
passwd root
- Restart the machine:
reboot
su.
Updating to beta versions of macOS
Enable Root on an unconfigured machine
- Open Terminal in the Setup Assistant.
- Elevate to root: su
su
- Enroll in the public beta:
/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil enroll PublicSeed
- Install all updates:
softwareupdate -i -a
- Restart the machine:
reboot
Using console
In addition to Terminal, you can also launch Console from the Setup Assistant. Console is useful for monitoring logs and performing diagnostics. For example, you can use it to track the mdmclient process while attempting to enroll the machine via DEP, or to monitor any startup process that occurs before the machine has completed setup.
The ability to access Terminal and Console during the Setup Assistant of macOS opens up a range of possibilities for advanced management and configuration of devices From obtaining network information to enabling the root user for updates or diagnostics, these tools provide additional control that can be invaluable in various situations. Leveraging these features can greatly facilitate the work of system administrators and enhance efficiency in configuring macOS devices.