Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

What is the difference between cat /etc/services and service --status-all?

Writer Sophia Terry

I would like to know the difference between these commands to show linux services:

cat /etc/services

and

service --status-all
2

1 Answer

The contents of /etc/services do not actually correspond to the services on your system. That file is actually a mapping of ports to the services that usually use them (say, port 22 by SSH). It's used by tools like netstat to give an understandable name in the output (instead of just dumping the port number). So it might, and usually does, have a large number of services listed that are not actually installed on your system.

The output of service --status-all is actually the status of installed services on your system.

See also:

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy