Besides using the keyboard within a program, we can also send signals to programs using the kill command. The kill command can kill programs, but these signals can also be used for reloading configurations or sending user-defined signals. The most common signals you may use are SIGHUP (1), SIGINT (2), SIGKILL(9), SIGTERM(15), SIGSTOP(17,18,23), SIGSEGV(12), and SIGUSR1(10)/SIGUSR2(12). The latter two can be defined within your program or leveraged by other developers.
The kill command can be used easily as follows:
$ kill -s SIGUSR1 <processID>$ kill -9 <processID>$ kill -9 `pidof myprogram.sh`