The folder /root
is just the home folder for root. You can think of it being at /home/root
for the purposes of working out what should go inside there (i.e. just like a normal user). There will be less 'dotfiles' than other users home folders, since root does not normally use lots of apps that write config files. If root uses firefox (BEWARE: It is dangerous to do so) then the folder /root/.firefox/
will be created.
The reason for it being at /
instead of /home/
is that it works when stuff fails. The filesystem root (/
) should be local, in order to mount other partitions and network shares (e.g. /home
on another partition or server). So when mounting fails and you are left without /home
the root user can log in and fix the problems up.
So not having anything it will result in settings being reset and the 'dotfiles' being created when you login as root (i.e. as soon as you do anything in bash .bash_history
will be created). Not having the folder around at all can cause some problems on logon, and/or mean /
is littered with root's files (e.g. .bash_history
) as the home folder is (temporarily) set to /
.