Interrupting Processes
Some processes are long-running, and will need to be interrupted.
For example, open your terminal application and try running the following command: ping 8.8.8.8
.
The ping
command will check the latency against a given IP address. It's useful for checking whether a given server is online or not. 8.8.8.8
is the IP address for Google's DNS server.
Unlike the commands we've seen so far, ping
is a long-running process. It never stops; by default, it'll keep pinging Google's DNS server until the end of time.
When we're satisfied with the results, we can interrupt it by holding Ctrl and pressing C. Even on macOS, where most shortcuts use the ⌘ modifier, we use Ctrl.
Another helpful command is Ctrl + D. This will end the current session. If Ctrl + C isn't working for some reason, Ctrl + D may work instead.
Finally, if all else fails, you can close the current tab/window. The shortcut depends on the OS and terminal application. Using Hyper on macOS, this is done with ⌘ + W.