Single user mode

From LogiWiki - Your Wiki for all things Apple MacBook and iPhone related
Jump to navigation Jump to search

Booting into single user mode will allow you to run terminal commands with full access to the file system. After running your commands simply type in reboot.

NOTE: before having write access you will need mount the root volume as read/write

  • mount -uw /

Create a new user in Single User Mode (This creates a new Administrator Account)

You can create a new administrator account by restarting the Setup Assistant:

  1. Boot into Single User Mode: Start/restart your Mac. As soon as you hear the startup tone, press and hold + S until you see a black screen with white lettering. (If you end up back on the login screen after a flash of the black screen with white lettering, enter your password and it will return to the black screen.)
  2. Mount the drive by typing /sbin/mount -uw / then ↩ enter.
  3. Remove the Apple Setup Done file by typing rm /var/db/.AppleSetupDone then ↩ enter.
  4. Reboot by typing reboot then ↩ enter.
  5. Complete the setup process, creating a new admin account.

With macOS Catalina, the APFS volume scheme is a little different. Change step 2 to /sbin/mount -uw /System/Volumes/Data . Continue to step 3.


Delete test account in Single User Mode (This removes any test acct and creates a new Admin acct)

  1. +S
  2. /sbin/mount -uw /
  3. cd /var/db/dslocal/nodes/Default/users/
  4. rm test.plist
  5. rm -rf /Users/test
  6. rm /var/db/.AppleSetupDone
  7. reboot

With macOS Catalina, the APFS volume scheme is a little different. Change step 2 to /sbin/mount -uw /System/Volumes/Data . Continue to step 3.