LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-25-2012, 05:38 AM   #1
Ijeoma
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Rep: Reputation: Disabled
Different between /etc/services and /etc/init.d


Hi.

Please I want to know the difference between /etc/services and /etc/init.d.
Secondly, I would want to know how to stop rwalld in ubuntu.

Thanks
 
Old 07-25-2012, 05:43 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,512

Rep: Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435
/etc/services is a file, /etc/init.d is a dir. you can have detailed info about /etc/services by executing man services
 
Old 07-25-2012, 05:59 AM   #3
Ijeoma
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks pan64. Please do you also know how to stop rwalld.


Thanks
 
Old 07-25-2012, 06:28 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,512

Rep: Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435Reputation: 2435
that depends on your os, probably rwalld stop and rwalld start works...
 
Old 07-25-2012, 06:34 AM   #5
themanwhowas
Member
 
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 216

Rep: Reputation: 29
init.d services have a number appended to them. This is the order in which the services are started and stopped during startup/shutdown. The services need to be started in order to provide dependencies between the services. starting or stopping a service with /etc/init.d/ does not provide the dependency. Often this does not matter. Using the service command is the 'new way' of starting/stopping services as this checks dependencies before starting/stopping the service.

for your service, have you tried 'service rwalld stop' or '/etc/init.d/rwalld stop'?
 
Old 07-25-2012, 06:44 AM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
The file /etc/services is just a lookup table linking service names to port numbers. As you might know, networks work with numbers, not with names.

Code:
telnet somehost smtp
The telnet program will lookup 'somehost' to get the IP address of it by using whatever is specified in resolv.conf (dns, file /etc/hosts) and it will lookup 'smtp' in /etc/services. Internally it will use the IP address and the port number.
 
Old 07-25-2012, 07:07 AM   #7
Ijeoma
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Difference between /etc/services and /etc/init.d

Thanks.

I have tried rwalld stop and it doesn't work. This is the error: "No command 'rwalld' found, did you mean:
Command 'rwall' from package 'rwall' (universe)
rwalld: command not found".


I also tried service rwalld stop and the error was: "unrecognized service". Tried rwall stop and it does nothing...
I can't even find it in the init.d directory.

One more question please, is rwall a protocol? If it is, what port number does it use in the /etc/services file?


Many thanks.
 
Old 07-25-2012, 08:33 AM   #8
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Just do a grep
Code:
grep rwall /etc/services
It will give you the line with the info (if it exists). I'm not behind a Linux machine to quickly check.
 
Old 07-25-2012, 11:07 AM   #9
Ijeoma
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks it worked. I guess rwall is not stored in /etc/services, because it worked for other protocols but didn't give any output for rwall. Or is rwall the same as netwall?


Many thanks.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] order of init services mahmoodn Linux - Server 7 05-06-2011 01:50 AM
How to register our own custom services to be initiated at known init level?? mayank_a Linux - Software 2 10-02-2005 09:21 PM
ACL's for /init.d/<services> stakhous Linux - Security 2 04-06-2005 10:37 PM
newbie: how to see see what services my machine is running under init.d ? sirpelidor Linux - Newbie 2 06-24-2004 03:20 PM
start services at init.d mikeshn Linux - General 1 12-24-2002 06:43 PM


All times are GMT -5. The time now is 09:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration