Contents
You can also use the true built-in or any other statement that always returns true. The while loop above will run indefinitely. You can terminate the loop by pressing CTRL+C .
How do you exit an infinite loop?
To stop, you have to break the endless loop, which can be done by pressing Ctrl+C.
What is the shortcut key to terminate infinite loop?
You can press Ctrl + C .