Commands.page Logo

How to Send SIGTERM Signal in Ubuntu Linux

This article provides a quick overview of how to issue a SIGTERM signal within the Ubuntu operating system, addressing common confusion regarding keyboard shortcuts versus command-line tools. It outlines the specific methods required to terminate processes gracefully and distinguishes SIGTERM from other interrupt signals often mistaken for it.

There is no single physical keyboard key that sends a SIGTERM signal by default in Ubuntu. While many users assume a combination like Ctrl+C performs this action, that shortcut actually sends a SIGINT (Interrupt) signal. To specifically send a SIGTERM signal, you must use the command line interface.

The standard method is to use the kill command followed by the Process ID (PID). By default, the kill command sends SIGTERM without requiring additional flags. For example, running kill 1234 sends a SIGTERM to process 1234. You can also explicitly specify the signal using kill -15 1234 or kill -TERM 1234.

If you are using process monitoring tools like top, you can press the k key to initiate a kill operation, which defaults to SIGTERM. In htop, pressing F9 allows you to select SIGTERM from a menu. However, in a standard shell session, the kill command is the definitive way to send this signal rather than a keyboard shortcut.