Create /Users/<username>
/code (or wherever you want it)
-
Open Disk Utility; create a new volume:
- APFS (Case Sensitive, Encrypted)
- Put in the password; it won’t save yet
-
Open terminal, run: sudo diskutil apfs list
-
Find the volume you created in the list; it’s probably the last item. Looks like this (volume CodeFS):
Volume disk1s6 19927108-1370-4A52-840F-3AF7B9F5FB6D --------------------------------------------------- APFS Volume Disk (Role): disk1s6 (No specific role) Name: CodeFS (Case-sensitive) Capacity Consumed: 737280 B (737.3 KB) FileVault: Yes (Unlocked)
-
Grab the UUID from the end of the first line, copy it
-
-
Run:
sudo vifs
-
Add a new line to the end of the file; use the below but change the UUID and the path:
UUID=19927108-1370-4A52-840F-3AF7B9F5FB6D /Users/richard/code apfs rw 0 2
- Mount the volume in disk utility; (right click and click “mount”). Tell it to save password unless you want it to ask each time you log in.