What Is Etc Services File in Linux?
Contents

The /etc/services file is used by applications to translate human readable service names into port numbers when connecting to a machine across a network. The file will typically include the service name, port/protocol, any aliases, and comments.

What does ETC services contain in Linux?

UNIX operating systems store what’s called a services file at /etc/services. It stores information about numerous services that client applications might use on the computer. Within the file are the service name, port number, and protocol it uses, and any applicable aliases.

How do I add a port to ETC services in Linux?

Setting the Service Name and Port Number – UNIX

  1. Log in as superuser, then display the /etc/services file.
  2. Viewing the existing port numbers, select any number between 1024 and 16000 that is not listed in the file.
Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest