2

Sometimes I would like to experiment with some commands which I am unfamiliar with (e.g. xmodmap), and also have the ability to revert the changes very easily without knowing much about the commands yet. Do I need some kind of light-weight virtualization or container (e.g. Docker) or sandbox? I am running Ubuntu 16.04 with LXDE. Thanks.

0

2 Answers 2

7

I suggest you set up a VM in either Virtual Box or VMware Workstation (VMware Player does not support snapshots), snapshot the VM, do your experiments, and then revert to the snapshot whenever you need a "known to be good" operating system environment.

5
  • VMware Player doesn't support snapshots, but I assume there would be nothing wrong with using cp -p on the shutdown guest image files. Other than a doubling of disk space usage, that is.
    – roaima
    Apr 20, 2018 at 8:48
  • @roaima Thanks. Do you mean that " using cp -p on the shutdown guest image files" does not double the disk space usage? I maybe misunderstood, but does cp -p not copy the image file?
    – Tim
    Apr 20, 2018 at 12:47
  • @Tim since Player won't let you snapshot a guest, you would have to copy the entire guest image to emulate a snapshot. If the image is 20GB then the copy would also be 20GB. Contrast with a true snapshot where the extra disk space required is only that required to store changes made since the snapshot has been taken.
    – roaima
    Apr 20, 2018 at 13:15
  • @roaima. The "image" size largely depends on the disk provisioning method, the number of snapshots, and changes made since snapshotting. If a 20Gb disk is thin-provisioned, the underlying physical file or files will typically be significantly smaller on a new VM.
    – fpmurphy
    Apr 21, 2018 at 7:37
  • Yes thank you. I'm aware of that. Possibly Tim isn't though.
    – roaima
    Apr 21, 2018 at 7:39
2

You may be interrested in Qubes OS, which enables you to run many Linux (or any other OS) containers using one or more OS templates.

For example we can use Debian template, install required software packages on it and than run the containers (personal, work and experiments).

In this scenario, anything you will do in experiments container, does not affect the template itself, or any other container at all.

In Qubes OS VM Manager you can make snapshots too, just like in VirtualBox.

2

Not the answer you're looking for? Browse other questions tagged .