website/content/blog/appsusinginternet.md

20 lines
758 B
Markdown
Raw Permalink Normal View History

2020-05-09 11:36:13 -04:00
---
title: "Show Applications using the Internet"
date: 2020-05-09T11:30:36-04:00
draft: false
2022-11-12 11:22:54 -05:00
tags: ["Linux", "Networking"]
2023-01-05 14:04:45 -05:00
medium_enabled: true
2020-05-09 11:36:13 -04:00
---
There's a great thread on [ask ubuntu](https://askubuntu.com/questions/104739/which-applications-are-using-internet) on seeing which applications are using the Internet. I'm going to add my own spin on the answers for future reference.
```bash
lsof -i | awk '{print $1}' | uniq | tail -n +2
```
Breaking it down...
- `lsof -i` shows us a lot of information pertaining to processes accessing the Internet.
- `awk '{print $1}'` filters the last output to only shown us the `COMMAND` column.
- `uniq` filters out multiple occurrences of a single application.
- `tail -n +2` removes the first `COMMAND` line.