pavement

Etc/services

From FreeBSDwiki
(Redirected from /etc/services)
Jump to: navigation, search

/etc/services is a system file that details what named services run on which numeric ports. The services file contains information regarding the known services available in the Internet. For each service a single line should be present with the following information:

official_service_name port number / protocol name aliases

For example, say you want to know what port and protocol mdns might use:

dave@abulafia % cat /etc/services | grep dns
dnsix            90/tcp    #DNSIX Securit Attribute Token Map
dnsix            90/udp    #DNSIX Securit Attribute Token Map
sdnskmp         558/tcp
sdnskmp         558/udp
mdns            5353/tcp   #Multicast DNS
mdns            5353/udp   #Multicast DNS


You may find it tempting to inject information about every IANA port you know about into this file, but DON'T - some of the system daemons rely on the information in this file to run, and you may very well confuse them into inoperability if you dump tons of non-FreeBSD-related information into this file. I personally figured this out the hard way when I replaced a system's /etc/services file with one I downloaded from the 'net, and it caused natd to refuse to start until I replaced my hacked-up copy with a stock copy.

Personal tools