If you are running a command or a script on the Mac Terminal and you want to know how to stop/terminate the execution and come back to your prompt then you can press Control + Z keys on your Mac keyboard.
Let's take an example where we ran a ping command, and want to stop it, just pressing Control + Z stops the execution as shown below.
Code2care@Mac % ping code2care.org
PING code2care.org (104.21.91.10): 56 data bytes
64 bytes from 104.21.91.10: icmp_seq=0 ttl=58 time=9.099 ms
...
64 bytes from 104.21.91.10: icmp_seq=4 ttl=58 time=15.527 ms
64 bytes from 104.21.91.10: icmp_seq=5 ttl=58 time=12.931 ms
^Z
zsh: suspended ping code2care.org
The ^Z characters appear on the screen and the command got suspended.

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!