How do I stop an infinite loop in Ubuntu?

How do I stop an infinite loop in Ubuntu?
Answer
Try Ctrl+D. If that doesn’t work then open a new terminal and ps aux | grep command where command is the name of the script you wrote and then kill the pid that is returned. Show activity on this post. And you just echo 1 > mytestfile , if you want to stop the loop.
 

Tìm kiếm

Back
Top