2 ms·
On Linux, I use the unshare command to hide my /home, you can do the same thing with /etc: sudo unshare -m bash -c "mount --make-rslave / && mount -n -o bind
by martius 11y ago
On Linux, I use the unshare command to hide my /home, you can do the same thing with /etc:
sudo unshare -m bash -c "mount --make-rslave / && mount -n -o bind /tmp/empty /home && sudo -u $(whoami) firefox -ProfileManager -no-remote"
it :
- forks the mountpoints table for the process to be executed (bash) - it requires capabilities (hence sudo),
- make / as as slave mount in this context (because of systemd which shares the / mountpoint (see: https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt https://www.kernel.org/doc/Documentation/filesystems/shareds...),
- bind an empty directory to /home (that I previously created), it will only be visible for this process and its children, since it's in an unshared mountpoints table,
- I run firefox in user mode.