Linux Networking
Ports
Linux has some special conventions and protocols around TCP/IP sockets.
Privileged Ports
On modern Linux systems, ports 1 through 1024 are privileged and can only be bound by processes running as root.
Unix Sockets
Linux offers a file-like object that can act like TCP/IP sockets for inter-process communication. These are known as Unix sockets.
Some advantages to a Unix socket over a traditional TCP/IP socket are:
- as first class file-like objects, Unix sockets obey file permissions
- Unix sockets are only addressable on the local file system, mitigating some security concerns
because there is no routing beyond filesystem lookups, Unix sockets can be faster