Book Image

Troubleshooting Ubuntu Server

By : Skanda Bhargav
Book Image

Troubleshooting Ubuntu Server

By: Skanda Bhargav

Overview of this book

Table of Contents (16 chapters)
Troubleshooting Ubuntu Server
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Signaling processes


It's time to look at some of the signaling processes in Ubuntu Server.

kill

The kill command is used to stop or kill a process. The command is used as follows:

kill <PID>

Here, PID is the process ID of the process running on the Linux machine.

Listing all signals

If you need to view all the available signals that can be passed to a process, use the following command:

kill -l

Please note that the option provided with kill is the letter l and not digit 1. You will see a screen similar to the following screenshot:

Let's look at some of the important signals next. The processes can receive the signals from other processes or users.

kill -1 or SIGHUP

Users can use kill -1 with digit 1 to force a process to reload its configuration. For example, if you want bash to reload its configuration, you can execute the following commands:

sudo su
ps -C init
kill -1 1

The output is shown in the following screenshot:

Here, we reinitialized the init process. Note that you need to be logged...