I am a newbie in Ubuntu, I have learned a command-
kill -1 -9 - send signal to process.
Plzz tell me what type of signal it is talking about and in the command what -1 -9 means?
I suspect the command you really learned of was
kill -9 -1
According to man kill, the format of the kill command is
kill [options] <pid> [...]
so -9 is an option and -1 is a PID or process identifier. As noted in the man page,
A PID of -1 is special; it indicates all processes except the kill process itself and init.
while for an explanation of the signal values, you can either run man 7 signal or get a synopsis from the kill command itself with the -l option:
$ kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP
6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1
11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM
16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP
21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ
26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR
31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3
38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8
43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7
58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2
63) SIGRTMAX-1 64) SIGRTMAX
So, as noted in the EXAMPLES section
EXAMPLES
kill -9 -1
Kill all processes you can kill.
The "you can" here is an oblique reference to privileges - in practice, ordinary users will not be able to kill processes that they do not own.
The actual command given in your question would attempt to send signal 1 (SIGHUP) to process -9 (which is not a valid PID) so will just return an error:
$ kill -1 -9
-bash: kill: (-9) - No such process
1 to a process whose PID is -9 (which is not a valid PID) whereas the second sends signal 9 to all process except itself and the init process, as explained in the manual page.
-9 is a command-line argument and 9 is the PID try it. it works. -1 is not negative 1 but an argument 1 ( signal ).
kill -1 -9
sends a SIGHUB to process with id 9
The first argument 1 is a numerical equivalent to a specific signal(SIGHUB) and the second 9 is a programPID.
SIGBU is describe as Hangup detected on controlling terminal or death of controlling process
On terminal kill -l list the various Linux signals and man 7 signal gives some descriptive overview of the various signals
kill -1 9 NOT kill -1 -9. I agree with steeldriver: it probably is kill -9 -1 since -1 is a special case. -9 is not a option, nor a valid process number since those are all positive except for -1
signal type and the second PID
man 7 signalwhich describes the signals and signal handling.