1837981 Members
1798 Online
110124 Solutions
New Discussion

/etc/services

 
RK_7
Advisor

/etc/services

Hi all,

I need to add portnumber 5555 in /etc/services file.After adding the line should i restart any daemon

rgds
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: /etc/services

Shalom RK,

Normally you would not need to restart the daemon.

As far as what daemon, you would need to know what service/daemon you are trying to enable.

It can't hurt to stop/start the daemon.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ninad_1
Honored Contributor

Re: /etc/services

RK,

The /etc/services file is used to keep the entries of the ports used on the system so as to directly co-relate a particular port number to a service for an application. This is more like a look-up or reference file rather than a configuration file, hence you can do away without restarting the service.

Hope this clarifies,
Ninad
Shahul
Esteemed Contributor

Re: /etc/services

Hi,

Direct answer to the question is "NO". But it all depend on this port is used for which application or what daemon. /etc/services file will keep all the port numbers and applications or processes will pick this information when they are initiated. So in brief, If you want any process to pick up this new port number, then you may need to restart that.

Regards
Shahul
Peter Nikitka
Honored Contributor

Re: /etc/services

Hi,

if you use NIS for name resolution
(check via
grep services /etc/nsswitch.conf
) , you must rebuild the corresponding maps (services.byservicename, services.byname).

A restart of any service is not required - the name-to-port resolution is done when getservbyname() (or similar) ist called by your application program.

mfG Peter

The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"