2

I wanted to keep a program, redshift, running in the background instead of having to keep a terminal constantly opened. I learned from a forum that I can do this by typing $ redshift & followed by $ disown. However, I can't figure how to stop this process without restarting my computer. I'm sure it was described somewhere, but I'm illiterate when it comes to Linux. If you can please explain in simple terms how to stop this, I would appreciate it.

2
  • pgrep redshift to get the PID, and then kill PID. Commented Mar 10, 2018 at 18:39
  • ok, great, then I'll add it as an answer Commented Mar 10, 2018 at 18:49

1 Answer 1

3

The first step is to find the id number of the process (known as the Process ID - PID). A nice utility for finding it is pgrep, where you can specify part of the name of the process and it returns the PID of each match:

pgrep redshift

ps aux | grep redshift is also helpful to determine the right process if there are more than one match.

The next step is to send a signal then will terminate the process:

kill PID

where PID is the number returned by pgrep

You can send different signals with different semantics, e.g. kill -SIGKILL PID is guaranteed to terminate the process, but it leaves no room for cleanup; kill PID and/or kill -SIGINT PID are usually preferable.

There is also pkill that will send a signal to a process matched by name.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.