Often you have a process that we need to terminate by process ID number. For this task you can use the kill command. Kill sends the process a signal telling it to end itself. If that doesn't work you can send it a different signal that forcibly removes the process. You can also kill all processes with a certain name or even all processes that were started by a certain user.
- [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 the terminal, type in pidof, space, crond,…and hit Enter.…Also type in pgrep, space, crond, 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 it a signal.…To list all possible signal types,…type in kill, space, -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…a non-destructive signal, like SIGHUB or SIGUSR1,…or we want to terminate a process with SIGTERM or SIGKILL.…
In many cases, SIGHUB forces a process…
- Topics include:
- Shell tips and tricks
- Pattern matching with globs
- Pattern matching with extended globs
- Using the Bash shell
- Monitoring processes using ps
- Monitoring processes graphically
- Managing processes
- Job scheduling
- Limiting access to AT and cron jobs
- Managing system services
Skill Level Intermediate
Linux: User and Group Managementwith Grant McWilliams1h 8m Intermediate
1. Linux Shells Overview
2. Using the Bash Shell
3. Linux Processes
4. Job Scheduling
5. System Services
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.