---
title: Monitoring open network connections and listening ports on Debian Lenny
kind: blog
description: 'To monitor which network connections are established and which ports your Debian Lenny server is listening on, simply run:'
words: 14
readingMinutes: 1
created: '2009-09-23T01:16:22.000Z'
updated: '2026-06-27T21:03:45+02:00'
tags:
  - linux
  - system-administration
---
```shell
sudo lsof -Pi
```

If this doesn't work, you might have to install `lsof` by running the following command:

```shell
sudo apt-get install lsof
```
