How To Tell If Your Linux Server Uses xinetd OR inetd sever

Q. How to tell if my Linux server is using xinetd or inetd service?

A. inetd is also known as super-server daemon and it runs on many Unix / Linux systems that manages Internet service such as ftp or pop3 or telnet.

ADVERTISEMENTS

xinetd (eXtended InterNET Daemon) is also an open-source daemon which runs on many Unix / Linux systems and manages Internet-based services such as ftp or telnet.

You can use netstat or ps command to find out if Linux / UNIX server using xinetd or inetd server:
# ps aux | egrep '[xi]netd'
OR
# netstat -tulpn | grep LISTEN | egrep '[xi]netd'
Sample output:

tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN     8552/inetd

OR

tcp        0      0 0.0.0.0:904                 0.0.0.0:*                   LISTEN      5271/xinetd

Usually,

  • RHEL / CentOS / Fedora Linux runs xinetd.
  • *BSD / Debian / Ubuntu Linux / Mac OS X runs inetd.
  • Default inetd configuration file location /etc/inetd.conf
  • Default xinetd configuration file location /etc/xinetd.conf
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
5 comments… add one
  • Stanislav Lechev [AngelFire] Mar 11, 2008 @ 7:10

    actualy you dont have to type:
    grep ‘[xi]netd’

    this one should be more accurate:
    grep ‘[x]inetd’

  • Stanislav Lechev [AngelFire] Mar 11, 2008 @ 7:12

    ohh.. and when you use -l (LISTEN) option of netstat … you dont have to grep for LISTEN

  • James Gibbons Apr 26, 2012 @ 19:29

    Also you can look for the /etc/inetd.conf file or /etc/xinetd.d subdirectory, and whichever directory you find tells you which one you are using.

  • Mohammad Nov 25, 2012 @ 18:50

    What is the difference between initd and xinetd ?

  • Arlen May 27, 2015 @ 15:36

    Actually, since ‘inetd’ is included in ‘xinetd’ wouldn’t

    grep ‘inetd’

    be the simplest approach? It would pull either string.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.