I wonder if there is a kind of a sandboxing solution for linux, sometimes there is more than one app that is candidate to solve my problems, in that case I want to try all of them to get the one which better fit my needs.
Usually I extract .deb files somewhere and export
PATH env adding the bin directory and
LD_LIBRARY_PATH adding the lib direcotry. Most of the times it works well, but sometimes the application requires /etc configurations, or other resources like images on share folder, that I was not able to solve.
My test machine is old, so I have low resources, a VM would bore me a lot, a separated linux installation in my disk doing chroot would please me better than a VM in performance, but it still takes some unwanted spaces because of repeated files, almost all of them are the same of my original distro.
I was wondering if there is somehow a mixed mount -bind with some magic flag, or other solution, something like the follow:
$ mkdir dir1 dir2 $ echo "Lipsum" > dir1/file1 $ echo "Original" > dir1/file2 $ sudo mount -o bind -some-magic-flag dir1 dir2 $ echo "Changed" > dir2/file2 $ touch dir2/file3 $ ls -1 dir2 file1 file2 file3 # it's ok $ ls -1 dir1 file1 file2 # file3 sould not be here! $ sudo umount dir2 $ ls -1 dir2 file2 file3 # file1 was not changed, should not be repeated here, but file2 was $ cat dir1/file2 Original $ cat dir2/file2 Changed