It's seems like OP has things all figured out. But just to clarify for future users that stuck with- or were stuck on Mojave: yes, /Applications
can be symlinked to another drive/place. I guess it should go without mention that it should be available at boot time without networking, unlike home directories.
Here's how it's done. It is also meant for users in Mojave (still, in 2023).
Boot from the recovery system partition or installer media/partition, even if the version doesn't match Mojave's (somewhat decent APFS support is needed though, so an installer no older than High Sierra):
On Macs with an keyboard you can just hold ⌥ even before restarting/powering the Mac and it will work. If you don't have an keyboard though, it is a trickier two part process: press [first] any other key(s) for it to connect (assuming it's wireless)3. It might need more than one keypress for it to link up. Usually there is no indication this has happened. On the second part then press the ⌥/Alt but not before it starts receiving signal, in devices such as the Thunderbolt Display the backlight comes on (screen goes from black to blank), in non- devices the power LED usually changes color or the sleep indicator turns off if there's one. It has to be right before or at the very start of the boot chime and definitely before the Apple logo shows up. If it shows up you were too late. Try different timings, if you can't get it, then {2.} otherwise select the recovery system to boot from it.
Hold ⌘⌥PR (or Win/SuperAltPR) → power → continue holding. It will take longer for the chime then it will reboot on its own → continue holding → reboot on its own. At least three cycles if your machine is older (it probably is). Now, it should be easier to get to the boot manager screen (1.)
✓ You can go directly to the recovery system holding ⌘R, or, if your system doesn't have a recovery partition or installer media: ⌥⌘R for Internet recovery. This gets the original version that came with your system, so it might not work after all (because of APFS compatibility). It will take a while, it doesn't matter if you're on gigabit fiber or ADSL, Apple's servers are slow.
Wait for the macOS Utilities window (with Time Machine, Install, Disk Utility…). Ignore them and go to the Terminal from the Utilities menu.
Disable SIP: csrutil disable
Get aquainted with the volumes (what's mostly understood as a disk in a live system): ls -laFhG /Volumes
1
✓ You can quit(⌘Q) the terminal right there, then launch Disk Utility from the Utilities window (which reappears) and compare what you just saw if you need a visual of things. ⌘Q and get back to the terminal.
✓ Your system is not macOS Base System as tempting as it may sound, that's the current system which maps to /
. Just like Macintosh HD or macOS or whatever-you-renamed-it to /
in your normal system, thus, /Applications
should be in /Volumes/Macintosh\ HD/Applications
. If there are spaces or other special characters in the name, press ⇥ after a few characters to complete the name with the correct escaping, ⇧⇥ if you shoot past it to go in reverse. It is still case-sensitive, so watch out for that as well. (…acOS/app
⇥ will not complete …acOS/Applications
while …acOS/App
⇥ will)
✓ To help you ID it you can rename you system's main volume to something silly so it stands out. However, the disk (volume) where you'll be moving /Applications to must stay put once you symlink to it since its name is part of the path. Changing it will break it, whereas in the main volume macOS does voodoo to keep the relationship of /
to it so you can rename it a live system.
Copy (don't move) /Applications
with cp
, ditto
, etc… e.g;
cp -fR /Volumes/macOS/Applications /Volumes/HFS\ Storage
cp -fR /Volumes/macOS/Applications/* /Volumes/HFS\ Storage/Applications
ditto /Volumes/macOS/Applications /Volumes/HFS\ Storage
- Quick reminders/notes
✓ Observe the difference when there's a trailing "/
":
-
- copies the directory to a new parent directory under which it will be recreated
-
- copies (most of) the contents of the directory, to a preexisting directory.
✓ "*
" won't match all files, therefore it's best to copy the parent directory, not its contents.
✓ .app files are directories disguised as single files. -R
must always be specified when cp
ing one.
✓ macOS' ditto
(3.) needs no options and makes exact copies (attributes, permissions, link types…). Syntax is the same as 1.
✓ Use ⇥ to complete filepaths (and double-check) as much as you can to avoid mistakes.
⌘N to open a new terminal window and navigate to the path to compare side by side.
✓ All the extra options (-laFhG
) to ls
will come in handy.
Delete the original /Applications folder. Leaving only the fresh copy in another drive. Create a symlink to it called exactly as the recently deleted file (full path from something to something to /Applications) and you're done:
✓ [in 2 commands] the syntax is the same as cp
's except instead of copying the file, a (symbolic, soft or sym)link to it is created, using the locations from the examples above, the syntax would be: ln -s /Volumes/HFS\ Storage/Applications /Volumes/macOS
, but first rm -fR /Volumes/macOS/Applications
is needed to make room for it.
✓ [in 1 command] Alternatively, in a single command: ln -sF /Volumes/HFS\ Storage/Applications /Volumes/macOS
.2
✓ These commands have a verbose option (-v
for cp
, -V
for ditto
and -v
for directories only in ditto
4) if you get anxiety it might not be doing anything specially in such a large directory. Keep in mind the systems needs to be artificially slowed so it manages to print every lined from every files copied. The difference is small, but it is not insignificant.
Other notes:
rEFInd
As your Mac gets older, resetting the PRAM and SMC — usually in tandem — will be needed more often; this also re-enables SIP, needing you to go into recovery again to run csrutil disable
in the terminal (you can check it's status in a live system with csrutil status
BTW).
A quicker alternative to this is a rEFInd flashdrive which has a quick SIP toggle button without needing to boot into any OS at all.
- It's not the rEFInd that you install on the ESP or on an HFS+ partition, those don't have the option, but
- You can use both simultaenous, they'd even detect one another and you can switch between them.
You Mac at this point, let's face it, it's an older Mac if it's running Mojave, there's a high chance you're not using the SD card reader, which makes an excellent rEFInd flash disk that's you'll never confuse with a million USB flash drives much more commonly used. Creating it is as easy as dc3dd
or dd if=~/Downloads/refind-flashdrive-0.13.2/refind-flashdrive-0.13.2.img of=/dev/disk4
. Takes like 5s.
Gatekeeper
Since you made it this far already, why not just going all in, it's clear you can tend for yourself and don't need Apple to "protect you" if you're messing with system file structures. Get rid of Gatekeeper: spctl --master-disable
. The only protection it gives is to Apple from prevemting devs to getting software in your system that circumvents paying their annual developer fee and submitting their source code for its literal blessing — a pretty good incentive for devs not to develop for macOS, case in point uBlock Origin for Safari, or ProfileCreator used heavily in the enterprise because it completely eclipses Apple's Apple Configurator 2. Only the opportunistic, subscription-demanding, microtransaction-loving vultures are left there.
This is done as root with SIP disabled. To confirm, ˝Allow app downloaded from: Anywhere" in System Preferences→ Security & Privacy→ General should be set and impossible to be changed. If you're are on that System Preferences pane, it won't change until you exit it and enter it again. There is no need to reboot.
FWIW, the presence of Gatekeeper is not that noticeable until you've experienced its abscense.
Complement with MDM or configuration profiles
Droping a folder in Login Items might be good enough for casual use of a resource, but if something is critical, say, your Mac is an automation controller, that just won't cut it. You need to script it or command it from a profile or MDM server. If you happen to have purchased Apple's macOS Server (Server.app
) way back when, its ProfileManager component (its only component in the case of Mojave) can do a lot of this and change it on the fly (you'll also need another mac to be the server). ManageEngine has a free tier for around 20 devices but it's not very fine-tuned control. Apple Configurator 2 or ProfileCreator (look for it on GitHub) are good options too, updating profiles on the fly is no longer an option though.
1: ls options
l = view as table
a = include dot files, all files
F = append type indication where:
/ = for directories and
@ = symlinks (those are all you need for now)
h = "use filesize multipliers (kilo-, mega-, tera-…) instead of
long ass numbers." reads verbatim the manpage, if you change
some or all of the words.
G = use color
2: Personally, I've had issues with this form not working (nothing
happens), so I end up deleting then symlinking anyway, but I have
not tested in the environment these commands need to be executed
where there are zero safeguards preventing the user from anything
( except installing from an old installer w/o having to change
the date because this is still an Apple product designed against
you using it for too long w/o feeling you need the newest. )
3: keyboards that connect through a dongle lose their connection when the
dongle loses power (temporarily during reboot). They reconnect quickly
but this is always started with the first keypress coming from the
keyboard. This signal rarely makes it to the computer while, depending
on each brand's technology for this. The computer does detect the
presence of the keyboard making it wake up, regardless so in a live
system it doesn't really matter, but at the booting stage the link
isn't there yet and you have to bring it up and be ready for the next
combination of keys all of this happening without any confirmation
(some Logitech keyboards flash once an indicator when they have linked
to their base station-the dongle. The older ones, the newer Bluetooth
ones avoid that to save energy). It sounds more daunting than it
actually is though, specially in older Macs, don't let it discourage
you. You'll find out that you have way more than enough time and then
some to do it.
4: using ditto as in {3.} copies a single directory, thus this message
will only be printed once. To print each directory (each app copied)
with ditto, you'll need to use the syntax of {2.} with ditto, e.g;
ditto -v …ions/* …ions (AKA "glob patterns") then you'll see a slower,
nicer, much cleaner list of apps copied one by one, since each .app
is a directory. Before going into recovery/installer, in your regular
system run "man ditto" (the other boot partitions/systems don't have
manpages)