This is a bit of an odd question. Most commends like echo $HOME will just print /home/user_name . I have a system where /home is mounted in a directory that is not under / and is also not its own partition.
There is a partition that is mounted in fstab with,
# shared linux data partition, /home is here by a bind mount
UUID=a89334f7-59b7-4d04-b89b-a5a30c379644 /mnt/linux_data ext4 defaults 1 2
The home directory is mounted using a bind mount,
# bind mount /home to directory to a directory on /linux_data
/mnt/linux_data/01_centos /home none bind 0 0
If I click on the home directory icon in dolphin, the location bar indicates /home/user_name as I would expect. Under the hood, this directory should actually be the directory /mnt/linux_data/01_centos/user_name which does exist in that location. I can navigate to /mnt/linux_data/01_centos/user_name by going through the /root icon in dolphin but I would like some means to print the full path to what the OS believes to be /home .
I am having some issues getting dolphin to display the rest of the partition that /home is mounted on and I would like to start by confirming that /home is where I think that it is. Am I making any sense at all???
I was just trying to confirm that /home was actually mounted at the partition/directory I specified in fstab. I have more than one copy of /home and I wanted to make sure that the version I was looking at in dolphin through the home icon was at the location I was expecting.
As I understand it, when the OS can't find /home where you have specified, the OS will create a /home under / . If you then specify a new /home in a different location (partition etc), the original /home under / will still exist but not be accessible. I wasn't sure how to tell which /home I was looking at. Later, I was curious as to why I couldn't find a simple way find that information and decided to post a question.
I have another related issue I am trying to resolve. I will make another thread about that this afternoon but I first wanted to confirm that my fstab entries were mounting /home where I wanted it.
So basically you want to confirm that /home is on the /mnt/linux_data partition rather than / ? You could check out the stat command:
stat -c%d "${HOME}"
This will give the device number of the partition you are on in decimal. By comparing it with, say, the device number of / you know whether it is on the root or a different partition. Unfortunately stat doesn't give access to the UUID of the device (that I could see, anyway).
While this doesn't in itself confirm that the home directory is mounted on the correct partition, once you have the correct device number you could write a script with that id preloaded into the script.
Of course, all this will have to be done with a script or on the command line, and not, as you initially wished, in the file manager (Dolphin).