Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the bash command on Ubuntu to list all the signals?

Is there a command to view all the signals on a Ubuntu machine? I'm using a bash shell.

like image 464
Varun Rao Avatar asked Dec 24 '22 18:12

Varun Rao


2 Answers

You can use kill -l to obtain a list (same as trap -l, at least on my system).

This command can also be used with an argument, such as kill -l SIGNAL, where SIGNAL is either a signal number (in which case the command will output its name), or a signal name (such as SIGHUP), in which case the command will output its number.

like image 109
Fred Avatar answered Dec 26 '22 07:12

Fred


You can use the trap builtin:

trap -l

From help trap:

-l print a list of signal names and their corresponding numbers

like image 27
Benjamin W. Avatar answered Dec 26 '22 07:12

Benjamin W.