Blog

Launchctl | Edit System Domain Config

Question

I messed up my launchctl configs while I was trying to disable FortiClient from starting on startup. I tried to use launchctl disable ... for services but ended up adding wrong entries to disable configuration.

Answer

Edit /private/var/db/com.apple.xpc.launchd/disabled* files and delete wrong data

What I Learned

  1. How to login to single-user mode on macOS.

    Press Command-S on system boot

  2. Make data editable because in single user it is mounted as readonly

    In single-user mode run

    $ cd /
    $ mount -uw /System/Volumes/Data
    
  3. After macOS Catalina launched the mount mechanism changed and split between system data and user data. This why now we use mount ... from previous point, but before that you mounted whole system

    $ /sbin/mount -uw /
    

Resources

Tags: