eolas/Programming_Languages/Shell_Scripting/Killing_processes.md

21 lines
320 B
Markdown
Raw Normal View History

2022-04-23 13:26:53 +01:00
---
tags:
- Programming_Languages
- shell
---
## Kill a process running on a port
For example a local server.
````bash
sudo lsof -t -i:8000
# List files and proces ID (-t) and internet connections (-i) on port number
$ 7890
# Gives you process id
sudo kill -9 7890
# Kill the process that is running there
````