Stop code running

when i want to stop code running in the terminal then click ctrl+c, i just got ^C and the code couldn’t stop ?

Hi @Mallak_Alqaisi,

You can use Ctrl+Z to suspend a program, you can then stop it using:

kill %1

This sends a normal termination signal and usually shuts it down cleanly.

If that doesn’t work and the process keeps running, you can force it to stop by finding its PID:

ps aux | grep <program_name>
kill <PID>

If it still doesn’t terminate, use:

kill -9 <PID>

kill -9 forcefully stops the process if it’s not responding.

Also, could you let us know:

  • What command are you running?
  • Whether this is a Python script, ROS node, etc.?

That will help us better understand why Ctrl+C isn’t stopping it.

Best,
Jason