Tag Info

Hot answers tagged


The unshare command can do pretty much what you are asking for: unshare -m "$SHELL" After that you can change any mounts you like locally to that shell only. I recommend that any mount commands you run inside the unshared shell use the -n flag, because otherwise it will change /etc/mtab which will be visible to the entire system. You probably want df and ...


Both. When you mount some device to /foo, then the files on the new device appear, and the ones on the original device are hidden. If you unmount /foo, then the original files will reappear.

Only top voted, non community-wiki answers of a minimum length are eligible