Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A UNIX socket is an inter-process communication mechanism that allows bidirectional data exchange between processes running on the same machine.

IP sockets (especially TCP/IP sockets) are a mechanism allowing communication between processes over the network. In some cases, you can use TCP/IP sockets to talk with processes running on the same computer (by using the loopback interface).

UNIX domain sockets know that they’re executing on the same system, so they can avoid some checks and operations (like routing); which makes them faster and lighter than IP sockets. So if you plan to communicate with processes on the same host, this is a better option than IP sockets.

Edit: As per Nils Toedtmann's comment: UNIX domain sockets are subject to file system permissions, while TCP sockets can be controlled only on the packet filter level.

share|improve this answer
Bronze this answer since it may have been the one to get you 10k. =) – Wesley May 15 '10 at 22:09
Maybe add that UNIX domain sockets are subject to file system permissions, while TCP sockets are not. As a result, it is much easier to regulate which users have access to a UNIX domain socket than it is for a TCP socket. – Nils Toedtmann Feb 12 '15 at 15:59

You can list your own machine local unix sockets with the following command:

netstat -a -p --unix

Have fun!

share|improve this answer
Is there a similar command for windows? – apache Mar 20 '10 at 14:28
Unix sockets don't exist on Windows. netstat does however work on Windows. – Mark Tomlin Jul 17 '12 at 14:29
@apache, similar thing in Windows called "Named pipes". – expert Nov 1 '12 at 6:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.