E
E
EVG822022-03-01 18:34:14
linux
EVG82, 2022-03-01 18:34:14

How to terminate a python process?

The pkill -f main.py command works every other time.

Now I need to make changes to one of the files, but I can’t complete the telegram bot. After typing the command into the console, it continues to run ((
what other commands are there to kill a process?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2022-03-01
@vabka

You find the desired process through ps and kill it with the usual kill -9

V
Vasya Pupkin, 2022-03-01
@Dimoncheck

import os

os.system(‘taskkill /f /im process.exe’)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question