I was trying to create a program that runs at start-up that takes a picture every 10 seconds (In a infinite loop) on my raspberry pi but I discovered I had made a mistake but couldn't Ctrl+C out of it. Is there a way to escape? (I did try to go to a different workspace but login prompt wouldn't show.)
How can I kill a program started from rc.local when Ctrl-C doesn't work?
startup;kill;rc
If you start the program from rc.local, then you cannot login to a shell and type ctrl-c to stop it.  The reason is that the program was not started from the shell that you're logged into.You will find the process ID (pid) of the program and use the kill command to send the process a signal, causing it to terminate.For example, at a console (in a terminal window or logged in via ssh):ps aux | grep 'the-name-of-your-progam'The number in the second column is the pid.  Use that pid to send the process a termination signal:kill -TERM [put-your-pid-here]A process may choose to ignore the TERM signal, so run the ps pipeline again.  If you still see the same pid, then send the kill signal:kill -KILL [put-your-pid-here]