Root level 'home' folder

Hi,


When I cd in Terminal to the root level of my start-up disk, I see there is a folder called 'home' that is invisible in the normal run of things.


To mimic my linux setup env it looks for files in /home/...


I see this old answer that solves it but i am using macOS Ventura. Need to know if its still true and safe to use


Root level 'home' folder - Apple Community


Posted on Oct 18, 2023 5:57 AM

Reply
4 replies

Oct 19, 2023 10:26 AM in response to ayanbarman

I doubt there are too many people on the Apple forums which will have that specific knowledge. Only one way to find out. Keep in mind that the "/home" directory is now a link to "/System/Volumes/Data/home" since anything outside of the "/Users" folder is on a sealed APFS system volume. The link allows data to be written because the "Data" volume is the only APFS volume where writing is permitted these days.

About the read-only system volume in macOS Catalina or later - Apple Support


Signed system volume security in iOS, iPadOS, and macOS - Apple Support

Who knows whether you will have any issues using it. It is usually best to configure things to follow standard OS file system usage procedures for best results which means utilizing the proper directories for each OS...not sure what is recommended these days for macOS, but if Homebrew is any indicator, they are using the "/opt" directory on Apple Silicon Macs (on Intel Macs it used to be "/usr/local"). Probably would be best to check with some other Apple developers or maybe Apple's own developer documentation...not sure if it covers this or not since I'm not a developer.



Oct 18, 2023 9:00 AM in response to ayanbarman

In Terminal, as you are at the UNIX command line, entering the following command with a return takes you to your home (/Users/yourname) folder. As macOS is not based on Linux, home is a different path and you will need to adjust to that change in nomenclature.


# take me to my home directory
cd
# take me to the previous directory location
cd -


Just bear in mind that Linux will be using the latest GNU Bash 5.2.15, and by default, macOS is using Bash 3.2.57 from 2007. The Apple supported Zsh shell is kept current at version 5.9 if you choose to use it instead of the ancient unsupported Bash.



To those of us having used various UNIX systems since the early 1980's, root is typically the '/' filesystem location and not associated with a user's home directory.

Oct 26, 2023 8:51 AM in response to ayanbarman

ayanbarman wrote:

I see this old answer that solves it but i am using macOS Ventura. Need to know if its still true and safe to use

Root level 'home' folder - Apple Community

I answered that question over 14 years ago.


Hard to say if you can still use /home. I think I was probably the last person to use it. 😄


i need to run a packaged central code used in my company which by default looks for configuration at path /home/.... .

Without knowing more about that central code package, it is difficult to say. However, even back in the day when /home was the standard location for home directories, it was still wrong to assume so. The correct way to do this would be to use the $HOME environment variable. You may have problems.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Root level 'home' folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.