LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   init and root (https://www.linuxquestions.org/questions/linux-newbie-8/init-and-root-715354/)

palisetty_suman 03-29-2009 07:25 PM

init and root
 
Hey may be i am asking you very simple question, but i have doubt regarding the difference between root directory and init directory. Its not homework please.

Tinkster 03-29-2009 07:51 PM

And what's your doubt?


Or question, maybe?

palisetty_suman 03-29-2009 07:56 PM

HI
 
the question is the difference between init and root Tinkster.

Tinkster 03-29-2009 08:29 PM

root is a user, init is a process?

i92guboj 03-29-2009 09:24 PM

Root can be many things: a user, a group, a filesystem (and even here, you can mean either / or /root, which are two things, and can be on separate fs's as well), or simply the name of a directory.

Init is the process which has PID 1, parent of the rest of processes. The term "init" can be used sometimes.

Tinkster 03-29-2009 09:25 PM

Ohhh ...

And / and /root are directories, of course. You didn't specify
which one you meant.

And there's no directory called init on any of the linux machines
I've had access to so far ...

i92guboj 03-29-2009 09:28 PM

Quote:

Originally Posted by Tinkster (Post 3492051)
Ohhh ...

And / and /root are directories, of course. You didn't specify
which one you meant.

They can be both directories and fs's. You will hear a lot of times about the root fs, which can be used to refer to both of them, though the most correct interpretation would be to talk about the root fs when you mean /, and the root dir when you mean /root, I guess, even if /root can be a separate fs itself.

Quote:

And there's no directory called init on any of the linux machines
I've had access to so far ...
I didn't say so. There's an /etc/init.d though. :)

Tinkster 03-29-2009 09:41 PM

And I didn't refer to your post at all ;}

In fact, when I started writing the above your post wasn't there yet ...

i92guboj 03-29-2009 10:00 PM

Oh, sorry, it seems that our timing was the problem hehe :)

sundialsvcs 03-29-2009 10:03 PM

Generically speaking, "root" refers to user-id #0, which is traditionally an "all-powerful" user. Processes running with this effective user-id are also "all-powerful."

In actual "hardened" Linux implementations, usually no processes actually have "all" powers, but those processes which have extraordinary powers are still referred-to as being "rootly."

"init," on the other hand, is a process that is manually constructed during the kernel-initialization sequence. It then becomes the first process that runs, and which is responsible for starting all the others. Also, when a process is "orphaned" by its parent, init is the process that reaps the orphan when it finally dies.

The "init" process is not allowed to die. If it does, for any reason at all, the kernel will panic with a rather poorly-worded message ... "attempted to kill init."

palisetty_suman 03-29-2009 10:06 PM

HI
 
Hi all, i am happy that i got answer what i wanted. Thanks. I was asking for root only (/).


All times are GMT -5. The time now is 01:43 AM.