Like with old-days-UNIX when you can just send a command to init and you're staring at black text screen with shell for your own use. ;)
2 Answers
Depending on your needs, try changing the log in window to ask for a user name and then enter >console as the user.
This likely was removed at 10.10 so you’d need to boot to recovery or ssh in or use a terminal app if this legacy init type bypass isn’t what you seek.
Also, this isn’t true root single user mode, that needs to happen early in the boot process on modern macOS.
-
-
@poige I certainly can’t get it to work on Mojave (but I didn’t mess with defaults write.) Feel free to edit my answer to make it exactly what you want or self answer if a cleaner answer is best once you test.– bmike ♦Jan 6, 2019 at 19:18
-
-
> There’s no documented way to transition from a booted OS to single user mode without a reboot. that's false claim.– poigeJan 8, 2019 at 9:21
-
Hi @poige maybe there is confusion what single user mode is. One person upvoted your answer and 5 down. Feel free to make a new answer if you have something else to add? That Wikipedia mentions that single user mode on macOS only happens Pre-boot so I’m open to you having a different meaning than I on what you consider single user. Let me know if I can help– bmike ♦Jan 8, 2019 at 23:07
Theory
In a nutshell, there's a documented in man launchctl way to accomplish such a switch into Single Mode w/o kernel reboot. It can be deployed, for e. g., from Terminal window with a SHELL-command:
sudo launchctl reboot userspace -s
Practice
El Capitan
I tested it in El Capitan on a Macbook Air 2015 where it worked. But I also have report from a user that his attempts on El Capitan were unsuccessful though. The only difference I can think of is Retina which requires different graphics mode or somesuch. I don't have Macbook with Retina running El Capitan, so for the time being I can't tell anything more in support of such a version.
High Sierra, Mojave
My tries with High Sierra were showing that this functionality is no longer working (compared to El Capitan). Again, may be it's due Retina, it's not clear. Mojave doesn't have it working also.
Thorough explanation by a contributor¹
There is a way to get back down to single user mode from an up und running macOS without doing a full reboot by running
sudo launchctl reboot userspace -s
This will relaunch just the userspace part of macOS without restarting the Darwin kernel and is equivalent to changing the runlevel on old-day-UNIXes.
For additional details see man launchctl:
reboot [system|userspace|halt|logout|apps|reroot ]
Instructs launchd to begin tearing down userspace. With no argu-
ment given or with the system argument given, launchd will make
the reboot(2) system call when userspace has been completely
torn down. With the halt argument given, launchd will make the
reboot(2) system call when userspace has been completely torn
down and pass the RB_HALT flag, halting the system and not ini-
tiating a reboot.
With the userspace argument given, launchd will re-exec itself
when userspace has been torn down and bring userspace back up.
This is useful for rebooting the system quickly under conditions
where kernel data structures or hardware do not need to be re-
initialized.
-s When rebooting the machine (either a full reboot or
userspace reboot), brings the subsequent boot session
up in single-user mode.
This means that on a technical level sudo launchctl reboot userspace -s doesn't call reboot(2) and therefore provides a way to switch to single user mode without a reboot.
Also the Wikipedia article on Single user mode says:
In OS X El Capitan and later releases of macOS, the mode can be reversed to single user mode with the command
sudo launchctl reboot userspace -sin Terminal, and the system can be fully rebooted in single-user mode with the commandsudo launchctl reboot system -s.
1 — Courtesy of @nohillside
-
It seems this " -s" option is no longer in the
launchctlman page. Curiously the man page says it was last edited in 2014. I tried today on an Apple Silicon mac with SIP off and it did not reboot in single-user mode.– John2 days ago
sudo launchctl reboot userspace -spreform a successful and usable userspace reboot! Simply put, regardless of the source of the documentation, the aforementioned command did not and does not work and therefore regardless of the fact the answer to this question was accepted nevertheless, I did not find it to work and is the reason for my downvote.sudo launchctl reboot userspace -spreform a successful and usable userspace reboot from Terminal while in the GUI! Please respect that not only did I take considerable time, energy and effort, I also expressed a valid reason for my downvote, which of course I'm under no obligation to do so. The fact that on three different Apple systems, a MacBook Pro, iMac and MacBook Air, running El Capitan and later, it did not work for me as advertised here or in the documentation! AFAIC For me, end of story.15.6.0 x86_64 root:xnu-3248.73.11~1/RELEASE_X86_64 x86_64. What respect are you talking about? :) Or if you talk about respect where's your respect to my words? :)