How to kill a running program??

Sometime, our program will run at infinite looping even at start up. There are a few ways to kill the running programs:

1) We need to identify the process or our running program.

2) Do this command:

Show processes

ps -ef
List processes

ps ax
List processes

3)  To kill the program:

sudo kill -9 PID

Where PID is the number listed process.

4) You also can use this command to kill your program running in the background


sudo killall my_project.a

5) Done