Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between socket and sock?

Tags:

linux

sockets

I found that there is "socket: /tmp/mysql.sock" in some config files, so what is the difference between socket and sock ?

like image 610
why Avatar asked Oct 21 '25 04:10

why


2 Answers

sock is an abbreviation of socket (also a sock is something that is worn on the feet).

like image 96
Alexander Gessler Avatar answered Oct 22 '25 20:10

Alexander Gessler


'Socket' is the technical term for a handle that refers to a network endpoint. It originated in the Unix API for networks, and has since leaked over to Windows.

A socket can refer to TCP connection, a UDP packet endpoint, an X.25 connection, or ... a Unix domain socket, which is a mutant named pipe.

People tend to name Unix domain sockets with 'sock' in the name, but there's no requirement.

like image 27
bmargulies Avatar answered Oct 22 '25 19:10

bmargulies



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!