How to create a directory in root on Catalina or Big Sur

Frank
Jan 5, 2021

--

Sometimes we need to create a directory in root, but we don’t allow to write the root directory since Catalina and Big Sur. Apple provides another way to realise this purpose, by modifying the file:

/etc/synthetic.conf

e.g. I first create a folder in my home directory:

/Users/testuser/Qt

after then added the following entry in order to create a symbol link to /Qt

Qt    Users/frank/Qt

Attension: the separator is Tab not space!!!!, after then save the file and reboot the system, you will see Qt has already been in the root directory.

testuser@Testers-MacBook-Pro / % pwd/testuser@Testers-MacBook-Pro / % lsApplications Qt  Users  bin  dev  home  private  tmp  varLibrary  System  Volumes  cores  etc  opt  sbin  usr

It works for Catalina and Big Sur.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Frank
Frank

Written by Frank

0 Followers

A C/C++ programmer has a strong curiosity with new technology (e.g. Go, Dart, Apex).

Responses (2)

Write a response