Monitoring Network Traffic in Linux

06.12.2026 8 minutes Author: Lady Liberty

Claims it’s checking for updates? On Linux, you can verify that. Using a single HTTPS request as an example, we explore how picosnitch links network traffic to a specific application and what you can learn from its network activity history.

How to Use picosnitch to Find Out Which Linux Applications Access the Internet

picosnitch is a Linux application that shows which programs on your computer use the network. It runs in the background and maintains a connection log. By opening this log, you can see which application contacted a particular server, when the connection occurred, and how much data it sent or received. The log can be viewed in a web browser or directly in the terminal.

Suppose you added a folder of photos to your cloud storage in the evening and noticed the next morning that your computer had uploaded several gigabytes overnight. Were your photos being synchronized? With picosnitch, you can select the overnight time range and identify which application generated the outgoing traffic. If it was your cloud storage client, you know where to check the synchronization history. If an entirely different application transferred the data, the log already contains its name and the destination server address.

picosnitch 24-hour overview. The graph shows when network traffic changed, while the table below helps identify the application responsible.

picosnitch starts collecting network activity history once the service is launched. The easiest way to perform your first check is to use a familiar example: install the utility, access a webpage using the curl command, and locate the request in the log. Once you understand what your own connection looks like, it becomes easier to investigate background network activity.

How to Install picosnitch and View Your First Connection

The following commands require a Linux system with support for modern eBPF CO-RE programs, Python 3.12 or later, and pipx version 1.5.0 or later. The service will be managed by systemd. Check the installed tool versions in your terminal:

python3 --version
pipx --version

If the pipx command is unavailable, install it by following the instructions for your Linux distribution. The version number matters because older releases do not support the --global option. Once the dependencies are ready, install the utility system-wide, create a service file, and enable event collection:

sudo pipx install picosnitch --global
sudo picosnitch systemd
sudo systemctl enable --now picosnitch
systemctl is-active picosnitch

The last command should return active. If the service fails to start, check the log messages from the current system boot using journalctl -u picosnitch -b. Since the web interface reads the collected records, troubleshooting an empty graph should begin by checking the service status.

For the initial test, it is convenient to create a network connection manually. In one terminal, open the live event stream:

sudo picosnitch top

In the second terminal, make a single HTTPS request. The command below discards the response body and displays only the HTTP status code. There is no need to download a file or open a browser for this test.

curl -sS -o /dev/null -w '%{http_code}\n' https://example.org/
Live picosnitch top event stream. This is what the list of network events looks like during real-time monitoring.

Locate curl in the event stream by its execution time. For a direct HTTPS connection, the remote port will typically be 443. If your system uses a proxy, the record may contain the proxy server’s address instead. Compare the application path with the output of command -v curl and examine the traffic counters in both directions. You now have a recorded event for which you know exactly which application initiated the request.

How to Determine Where and Why an Application Connected

Stop viewing the live event stream by pressing Ctrl+C. The service running through systemd will continue collecting events. To revisit your test request, open the web interface:

picosnitch webui

On the same computer, open your browser and navigate to http://localhost:5100. Select the time range during which you ran curl and review the traffic associated with the executable. If the record has not appeared yet, wait a few seconds: under default settings, the service groups records at a minimum interval of ten seconds. On a server without a graphical interface, you can access the same database over SSH using the picosnitch tui command.

Now repeat the experiment with an application whose behavior you want to investigate. For example, open a local photo in an image editor, wait a minute, and then click “Check for Updates.” Record the time of both actions. This makes it easier to distinguish startup activity from a request you explicitly authorized by clicking the button. If a helper process established the connection, examine its parent process: the editor may have delegated the task to a separate utility.

Web Content details in the official demo. Once a process is selected, you can see the addresses and domains to which its traffic is directed.

Three details are important when interpreting a network event. The file path identifies which copy of the application was executed. SHA-256, a digital fingerprint of the file’s contents, allows you to compare it with a previously observed version. The direction and volume of traffic help determine what to investigate next. If an image editor received several megabytes of data, it is worth checking what it downloaded. If it sent approximately the same amount after opening a photo, repeat the experiment with a different file and review the synchronization settings. A matching data size alone does not prove that the image was transmitted.

It is also easy to jump to conclusions about domain names. A single server can host multiple websites, while a GeoIP country code indicates the geographical location of an IP address according to a geolocation database. It does not establish which company owns the data. Similarly, port 443 and the number of bytes transferred do not reveal the contents of an HTTPS request. To determine the purpose of a connection, cross-reference the address, timestamp, and process with the application’s documentation or its own logs.

How to Configure Notifications and Monitor Background Activity

After its initial launch, picosnitch creates the /etc/picosnitch/config.toml file. Older guides may refer to JSON instead. In the current version, configuration settings are stored in TOML format, while state.json contains previously identified executable files and their hashes. The service checks this list when determining whether to display a notification.

sudoedit /etc/picosnitch/config.toml

In the [desktop] section, make sure the notifications = true parameter is enabled. For a service that starts at system boot, you can specify the graphical session username in the user field. To find it, run the id -un command in a regular terminal under that user account. Displaying notifications requires notify-send. After editing the configuration, save the file and restart the service:

sudo systemctl restart picosnitch

Notifications should appear when an application previously unknown to picosnitch accesses the network for the first time or when a known executable file changes. Running the same curl command again may generate a new entry in the history without triggering another desktop notification. After a routine browser update, the opposite occurs: the file path remains familiar, but the file contents and hash have changed.

Grouping by parent process in the terminal. This mode helps identify which process launched the network utility.

Imagine that a server sends a large volume of data every night at 3 a.m. In the web interface, narrow the time range to the relevant hour, identify the executable responsible for the most outgoing traffic, and check what launched it. If it is ssh, examine its parent process and the backup start time. A match with the backup schedule, expected destination server, and backup size provides a much better explanation of the event than the name ssh alone.

By default, the local SQLite database retains network activity history for 30 days. This is controlled by the retention_days parameter in the [database] section. On a shared machine, also review the commands parameter in the [log] section: command-line arguments may contain private file paths, addresses, or tokens. If you only need to track applications and traffic directions, you can disable argument logging by setting this parameter to false.

To investigate an unfamiliar file, picosnitch offers optional integration with VirusTotal. It is enabled through the api_key parameter in the [virustotal] section. Keep file_upload = false if you want to send only file hashes to the service. When set to true, the utility may upload the executable itself if its hash is unknown to VirusTotal. This is an important distinction when dealing with internal software builds. The absence of a match simply means that no known result exists for that particular hash.

There are also limitations to what a hash can reveal. If a Python script initiated a network request, the interpreter’s SHA-256 hash identifies the Python executable itself. Different scripts can run through the same interpreter. In this case, you will need to examine the command-line arguments, parent process, and task logs. If a short-lived process has no associated hash at all, check /var/log/picosnitch/error.log: sometimes a process terminates before the service has a chance to open its executable file.

picosnitch is particularly useful when a specific question arises: “What accessed the network after this action?” Launch the application, reproduce the action, and locate the corresponding record. This allows you to distinguish background synchronization from update checks or identify a connection that requires further investigation. If an address needs to be blocked, however, you will need to configure a separate firewall rule.

Subscribe
Notify of
0 Коментарі
Oldest
Newest Most Voted
Found an error?
If you find an error, take a screenshot and send it to the bot.
↑