1

I started a python program and send it to the background.

$: python myapp.py &

Then I closed the terminal and forgot the PID it returned. Now I would like to kill that program, the only clue I left is the program name myapp.py. How can I find the PID using shell command?

1

1 Answer 1

1

First way:
Try ps -ef | grep myapp.py to find the PID, Then kill it.

Another way is:
Try pkill -f myapp.py to kill it by its name.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.