Forrest logo
back to the getent tool

getent:tldr:8eb37

getent: Get list of all services.
$ getent services
try on your machine

The getent services command is used to retrieve service names and port numbers from the service name database.

In Unix-like operating systems, services are identified by a unique name and associated with a specific port number. The service name database maps these service names to their corresponding port numbers used by the system.

When you run the getent services command, it queries the service name database and displays a list of all the services available on your system. Each entry in the output typically consists of the service name, port number, and additional information such as the protocol used (TCP or UDP).

Example output of the getent services command might look like:

...
ssh               22/tcp    # SSH Remote Login Protocol
smtp              25/tcp    # Simple Mail Transfer Protocol
http              80/tcp    # Hypertext Transfer Protocol
...

This command is useful for administrators or developers who need to know the standard service names and port numbers associated with different protocols in order to configure network services or troubleshoot connectivity issues.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the getent tool