Results 1 to 9 of 9

Thread: The purpose of the /root directory

  1. #1

    Default 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

  2. #2
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,037

    Default Re: The purpose of the /root 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

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,180
    Blog Entries
    3

    Default Re: The purpose of the /root directory

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

    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.
    openSUSE Leap 15.1; KDE Plasma 5;

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,729

    Default Re: The purpose of the /root directory

    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
    Henk van Velden

  5. #5
    dd@home.dk NNTP User

    Default Re: The purpose of the /root directory

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

    [/code]
    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:~>
    [/code]

    https://www.google.com/search?q=site...nsuse.org+TSUM

    ???

    --
    dd

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,729

    Default Re: The purpose of the /root directory

    Quote Originally Posted by dd@home.dk View Post
    On 08/02/2012 06:50 PM, Jim Henderson wrote:
    > when you use TSUM or su -

    [/code]
    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:~>
    [/code]

    https://www.google.com/search?q=site...nsuse.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.
    Henk van Velden

  7. #7
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,037

    Default Re: The purpose of the /root directory

    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

  8. #8
    dd@home.dk NNTP User

    Default Re: The purpose of the /root directory

    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

  9. #9
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,037

    Default Re: The purpose of the /root directory

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •