What exactly are dot files? how do you guys save and recreate your setup automatically?

Dot files are used by a wide variety of operating systems and programs.

I’m Most familiar with Debian so it’ll speak from this. I use .bashrc and .bash_profile to set up env variables, scripts to run every time I launch a VM and more. I don’t use these in disposable VMs but use them in my work and personal VM for setting up my development environment.

You can see an example of what I used in bash_profile a few years ago.

Think of it as a bash file that runs every time the terminal starts. Other dot files do different things at different times.