How To Install Socat In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Socat In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

socat

Multipurpose relay (SOcket CAT).

Maintainer: Laszlo Boszormenyi (GCS)



Section: net

Install socat

  • Debian apt-get install socat Click to copy
  • Ubuntu apt-get install socat Click to copy
  • Alpine OS apk add socat Click to copy
  • Arch Linux pacman -S socat Click to copy
  • Kali Linux apt-get install socat Click to copy
  • CentOS yum install socat Click to copy
  • Fedora dnf install socat Click to copy
  • Raspbian apt-get install socat Click to copy
  • macOS brew install socat Click to copy

Multipurpose relay (SOcket CAT).

How to use socat?

Below are few example commands for socat that you can use in the terminal.

Listen to a port, wait for an incoming connection and transfer data to STDIO:
socat - TCP-LISTEN:8080,forkClick to copy
Create a connection to a host and port, transfer data in STDIO to connected host:
socat - TCP4:www.domain.com:80Click to copy
Forward incoming data of a local port to another host and port:
socat TCP-LISTEN:80,fork TCP4:www.domain.com:80Click to copy
Installation of latest socat command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.