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

i have heard the term dot files being thrown around here i believe, what are dot files and how can i use them to get a system automatically up and running?

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.

In Linux, any file whose name start wth a dot is hidden - that is, ls
will not show the files; you have to use ls -a (-a for all files).
The same will apply in nautilus or other GUI file manager - you have to
explicitly show hidden files to see them.
Wildcards like “*” will not match dotfiles.

Many applications use these hidden files for configuration purposes.
You may also find user configuration files in a hidden directory like
“.config” or “.local” - such files will not be hidden files themselves.

If you have made changes in a qube, those changes may be stored in a
dotfile or hidden directory in /home/user
If you take a Qubes backup those files will be backed up, and can be
restored.
If you have set up a qube as you like it - perhaps selected a color
scheme, fixed which files appear in the file manager, set it up to open
certain files in specific applications, and so on - when you clone the
qube that information will be transferred to the clone.

2 Likes