LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-03-2007, 02:22 PM   #1
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Rep: Reputation: 32
initd vs inetd vs init.d vs inet.d vs xinit.d etc - what are they, how do they differ


Can anyone tell me what the differences are in init.d and inet.d and initd and inetd and all the rest?

I am more interested in their theoretical and functional differences than in... whatever else they may have (i.e. distro-specific use). Do they all exist to start/kill programs? Or is one for initialization of progs/services and another for networking or something?

Thanks.
 
Old 04-03-2007, 02:32 PM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
init is the master process that runs all other processes especially kernel specific processes. For example if you run the following command then your computer will run in single user mode:

init 1

There is no initd that I know of.

inetd is a program that starts services on demand. For example, instead of running an ftp server in memory all the time you could have inetd start the server when it is necessary instead of wasting memory and resources. But due to modern computers having so much memory it is no longer necessary. Now you can run hundreds of services in 2GB of memory or more, which is cheap compared to more than 10 years ago. xinetd is the successor of inetd.

init.d is the directory /etc/init.d that contains the scripts that get called to start a service. For example, the apache http web server.

xinit.d contains scripts that are used by xinit, the successor of init, which opens services as they are needed and then closing them, instead of running them in the background all the time.
 
Old 04-03-2007, 02:37 PM   #3
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Original Poster
Rep: Reputation: 32
OK so init starts specific run-level services (as defined in rc4.d etc)

while inet.d runs only those services that are requested, and found in /etc/init.d/ ?

Why the confusing naming conventions!? (I don't expect you to know)

How does /etc/rc.d/ fit into this if there is no runlevel associated with it? Or does this hold everything, and the rc3.d/ files are just links to the 'master' rc.d/ ?
 
Old 04-03-2007, 02:51 PM   #4
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Exactly, everything is broken down to the lowest level possible. This was done intentionally and it's how UNIX gurus think; it enables for faster typing and shorter directory names especially when you have very big clusters of systems.

It makes sense because you can break things down in many many ways. Abreviating helps a lot but makes it confusing if you are not familiar. Hence, init = initialization, inet.d = internet deamon, rc.d = run command directory.

Remember that what they refer to as Linux (as a whole) is a bunch of hundreds or even thousands of little programs that each do one thing very well and very precise then the process is handed over to another program that does the next thing very efficient and precise then the next and so on... That makes for a much more stable system that is easier to diagnose because you can break it down and narrow down where the problem is coming from. That's one reason why UNIX/Linux is so stable, because every little process is broken down to it's simplest form. Hence, all those little anoying directories and abbreviated files.
 
Old 04-03-2007, 03:08 PM   #5
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Original Poster
Rep: Reputation: 32
ramram29 thank you SO much for the explanations. One more question, please...

if inet.d handles internet things, why are system services started from within here? not all system services rely on a network (or do they?)

Thank you again.
 
Old 04-03-2007, 03:17 PM   #6
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
inetd is an old service wrapper. It starts services as you need them. This allows you to save resources on your server if you are not using them all the time. You can run services permanently in memory all the time, like your ftp server, for example. Or you can run it using inetd or xinetd - when someone tries to connect to you via ftp then inetd will start the ftp services then disconnet when done. However, inetd is slower. I only use xinetd for example, when remote controlling my server using VNC. One great thing about xinetd is that it uses libwrap which is another layer of security - especially if you only want to allow certain networks access to your service.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I determine which servers in Slack 11 are monitored by inetd / inetd.conf Old_Fogie Slackware 2 11-25-2006 02:06 PM
inet<---eth1[LinuxBox_1]eth0<---e0[LinuxBox_2] : LinuxBox_2 hv no inet connection? Andrea_44 Linux - Networking 5 10-25-2006 09:18 PM
/etc/X11/xinit/.Xmodmap; run level 4 won't init script Potatopopper Slackware 5 11-27-2005 08:37 PM
chrooting or jailing inetd or inetd started daemons ? MasterC Linux - Security 2 07-15-2003 06:28 PM
inetd script in /etc/init.d is running amuck int0x80 Linux - Newbie 1 03-07-2003 10:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration