From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Send signals to processes

Send signals to processes - Linux Tutorial

From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Start my 1-month free trial

Send signals to processes

- [Instructor] It's common to send signals to processes. One of those signals would be terminate if you wanted to end the process. If that doesn't work, we can forcibly kill a process by sending a kill signal. First, though, we need to know the process ID. We've already talked about the PS command for this, but we have a couple of other tools that are simpler. In a terminal type in pidof space cron D and hit enter. Also type in pgrep, space, cron D, and hit enter. Pgrep is more powerful and allows us to filter on a lot of items like username and command. But for the purpose of just getting a process ID, either will work fine. Once we have the process ID, we can use the kill command to send out a signal. To list all possible signal types, type in kill space dash L and hit enter. There are 64 different signals, but it's not common practice to use all of them. Generally, we want to send the process…

Contents