The main problem with using virtual machines at school or work is that the home directory is sometimes made vollatile by the system administrators. Every time that you log in, all dotfiles are gone. As a solution, you can use the permanent network share or a cvs repository to store dotfiles, and `stow` to manage them and restore them in a timely manner, only needing to run one script.
## Stow
GNU stow can be downloaded from its [homepage](https://www.gnu.org/software/stow/), or from any of the mirrors.
### Install stow as a user
The best option is to download `stow-latest.tar.gz`. Then, to install it follow these steps:
```bash
tar xf stow-latest.tar.gz
cd stow-*
./configure --prefix=$HOME/.local
make
make install
```
### Install stow to non-volatile storage
Now that `stow` is installed, we can move on to move it to the user's permanent storage (identified here as `$STORAGE`):
Usage of `stow` is detailed in [this article](http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html), but the bsics are: create in a folder the tree that must be replicated, such as we have done for stow itself. An example for the bash dotfiles would look like:
```
bash
├── .bash_profile
└── .bashrc
```
It would be applied with `stow --target $HOME bash` (for the folder name, not the binary name). Some of these folders could also be imported into the cvs of your choice for easier storage and sync.
Now it is trivially easy to restore your dotfiles:
There are examples of both scripts in the repo, one for the first time install and movement of `stow` to permanent storage and another to use once per session.