在 Linux 和 macOS 上用于监控套接字和端口的人机友好的替代工具。
### A human-friendly alternative to netstat for socket and port monitoring on Linux and macOS. > [!NOTE] > The master branch code and readme may include features that are not yet released. For the official, stable version and its documentation, please refer to the [crates.io](https://crates.io/crates/somo) page. ## ✨ Highlights: - pleasing to the eye thanks to a nice table view - filterable and sortable output - interactive killing of processes - json and custom formattable output - from ``netstat -tulpn`` to ``somo -l`` - cross-platform support for Linux and macOS - you can find all features further down
## ⬇️ Installation: ### Using cargo: ```sh cargo install somo ``` Most of the time, you’ll want to run this with ``sudo`` to see all processes and ports. To make that work, you can create a symlink so the binary can be run with root privileges: ```sh sudo ln -s ~/.cargo/bin/somo /usr/local/bin/somo sudo somo # this works now ``` ##### Or install directly from GitHub: *Warning:* This will install the cutting-edge development version and may be unstable or contain incomplete features. ```sh cargo install --git https://github.com/theopfr/somo ``` ### Debian: If you use a Debian OS go to [releases](https://github.com/theopfr/somo/releases) and download the latest .deb file. ### Arch: ```sh yay -S somo ``` ### Nix: *Warning:* This will install the cutting-edge development version and may be unstable or contain incomplete features. You can build it using Nix with Flakes: ```sh nix build 'github:theopfr/somo?dir=nix' sudo ./result/bin/somo ``` ### Homebrew: Homebrew packages a [`somo` formula](https://formulae.brew.sh/formula/somo) for macOS and Linux. ```sh brew install somo ``` --- ## ♀️ Running somo: To run somo just type: ```sh somo # or sudo somo ``` ## Features: Click to see the somo --help summary! ``` … ``` ### ✨ Filtering: You can use the following flags to filter based on different attributes: | filter flag | description | value | | :------------- |:------------- | :----- | | ```--tcp, -t``` | filter by TCP connections | - | | ```--udp, -u``` | filter by UDP connections | - | | ```--proto``` | deprecated – use ``--tcp`` / ``--udp`` instead | ``tcp`` or ``udp`` | | ```--port, -p``` | filter by a local port | port number, e.g ``5433`` | | ```--remote-port``` | filter by a remote port | port number, e.g ``443`` | | ```--ip``` | filter by a remote IP | IP address e.g ``0.0.0.0`` | | ```--program``` | filter by a client program | program name e.g ``chrome`` | | ```--pid``` | filter by a PID | PID number, e.g ``10000`` | | ```--user``` | filter by the user that owns a connection | username, e.g ``root`` | | ```--open, -o``` | filter by open connections | - | | ```--listen, -l``` | filter by listening connections | - | | ```--established, -e``` | filter by established connections | - | | ```--exclude-ipv6``` | deprecated – use ``--ipv4`` instead (mutually exclusive with ``--ipv6``) | - | | ```--ipv4, -4``` | filter by IPv4 connections | - | | ```--ipv6, -6``` | filter by IPv6 connections | - | ### ✨ Compact table view: To get a smaller, more compact table use the ``--compact, -c`` flag. ### ✨ Process killing: With the ``--kill, -k`` flag you can choose to kill a process after inspecting the connections using an interactive selection. ### ✨ JSON and custom output format: Using the ``--json`` flag you can choose to retrieve the connection data in JSON format.
暂无开放 Issues,或尚未同步最近议题。