Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been moving files around to prepare for a remaster. I put some files into root, which I though might help an issue I was having with auto login in live mode.

anyway, putting files into root changed nothing, thing is I cant remember if root was empty or not when i started so, should the root folder be empty, and if not, what should be in there?

thanks

share|improve this question

2 Answers 2

up vote 2 down vote accepted

/root is simply the homedir for the root user.

By default, all that should be in there are some dotfiles, like .bashrc and .profile.

share|improve this answer
    
so its just the same as regular home folder with root privilege? –  Jayo Nov 18 '11 at 20:09
    
in other words, if i empty it, all will be ok? –  Jayo Nov 18 '11 at 20:12
    
actually, im not sure that you are right, i just compared the 2 folders, and my regular home folder has a lot of extra folders not present in root, the dropbox folder for example –  Jayo Nov 18 '11 at 20:18
    
@Jayo Dropbox is only going to be installed for regular users, not root. This goes for most applications. –  Kris Harper Nov 18 '11 at 20:22
    
Nothing in /root is critical. It's just homedir stuff. Since you never log in as root (right?), the worst case scenario is that you might lose a few interface settings when you're running some program through sudo or gksudo. But any files your software wants in /root will get automatically recreated if necessary, though with default contents. –  Scott Severance Nov 18 '11 at 21:51

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 /.

share|improve this answer
    
thanks for the info :) –  Jayo Nov 19 '11 at 15:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.