https://apple.stackexchange.com/questions/388236/unable-to-create-folder-in-root-of-macintosh-hd
This command creates /etc/synthetic.conf
file with an intial entry.
ROOT_FOLDER="programs"
ACTUAL_FOLDER="tmp/programs"
sudo touch /etc/synthetic.conf
sudo chmod 0666 /etc/synthetic.conf
sudo printf "${ROOT_FOLDER}\t${ACTUAL_FOLDER}" >> /etc/synthetic.conf
sudo chmod 0644 /etc/synthetic.conf
sudo chown root:wheel /etc/synthetic.conf
Note, when you run this command the terminal may think it failed,
but to verify it worked run ls -al /
to confirm your links were created.
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t
If you want to delete the file and the symbolic folders it created.
sudo chmod 0666 /etc/synthetic.conf
sudo rm /etc/synthetic.conf