The purpose of the /root directory

I know that the /root directory is the superuser’s home directory, but what is the exact purpose with it?
I mean, why am I moved from my /home/lars directory to the /root directory when I start Terminal Super User Mode or issue su -?

Thanks in advance/
Larilund

The purpose of it is to be the home directory of the root user :frowning:

Settings files for the root user are kept there.

If you use “su” in place of “su -”, then you will probably stay with your own home directory. But you might then have a path that is wrong for root, and some of your settings might be changed and have their ownership changed to root, so that they won’t work for you. It really is better for the root user to keep to its own home directory.

On Thu, 02 Aug 2012 16:46:03 +0000, larilund wrote:

> I know that the /root directory is the superuser’s home directory, but
> what is the exact purpose with it?

Just like any user, to hold files that belong to that user.

> I mean, why am I moved from my /home/lars directory to the /root
> directory when I start Terminal Super User Mode or do su -?

Because when you use TSUM or su -, you are using the environment of the
user specified (with no user specified, that means root).

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

To add. It is of course the home directory of user root. And it is there and not in /home/root (which you might think as being the obvious place) because /home is often on a separate file system. Thus when you have system problems and e.g.* /home* is not mounted for whatever reason, root can still login because it’s home directory is allways there as long as* / *is mounted.

I guess you can understand the problems one has when root can not login anymore :frowning:

On 08/02/2012 06:50 PM, Jim Henderson wrote:
> when you use TSUM or su -


denverd@linux-os114:~> TSUM
If 'TSUM' is not a typo you can use command-not-found to lookup the
package that contains it, like this:
cnf TSUM
denverd@linux-os114:~> locate TSUM
denverd@linux-os114:~> tsum
If 'tsum' is not a typo you can use command-not-found to lookup the
package that contains it, like this:
cnf tsum
denverd@linux-os114:~> locate tsum
denverd@linux-os114:~>

https://www.google.com/search?q=site%3Aopensuse.org+TSUM

???


dd

TSUM is a mnemonic, maybe just invented here in this thread for “Terminal Super User Mode”. Which itself is an item somewhere in the desktop main menu (at least in KDE, but as the OP did not explain what desktop he uses, it could be in another one).

It is not that TSUM can not be found. Nobody asked: Why can I not find/execute TSUM.

On Thu, 02 Aug 2012 18:06:03 +0000, hcvv wrote:

> dd TSUM is a mnemonic, maybe just invented here in this thread for
> “Terminal Super User Mode”.

Yes. I guess I thought it was obvious that I was being lazy and using an
abbreviated version of the root post.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 08/02/2012 08:18 PM, Jim Henderson wrote:
> I guess I thought it was obvious that I was being lazy and using an
> abbreviated version of the root post.

IGISHPMAABWTJG!


dd

On Thu, 02 Aug 2012 18:29:28 +0000, dd wrote:

> On 08/02/2012 08:18 PM, Jim Henderson wrote:
>> I guess I thought it was obvious that I was being lazy and using an
>> abbreviated version of the root post.
>
> IGISHPMAABWTJG!

If you say so. Since the OP in the thread had used “Terminal Super User
Mode”, I thought “TSUM” would make sense to anyone reading it, especially
in the context of talking about that and the use of ‘su -’, which the OP
also said.

Obviously I was wrong in assuming that I’d be understood.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C