Emmett P
Emmett P

Reputation: 205

How to Turn Off a Program Running from .bash_profile

I am working with a Raspberry Pi running linux, and have modified the .bash_profile file in order to a run a program I've made automatically upon login. This works great, but I was wondering how to turn the program off, since for ctrl+c I would need to be running the program in the terminal.

Upvotes: 0

Views: 291

Answers (2)

Joakim Ericsson
Joakim Ericsson

Reputation: 4696

I always use

pkill - f processname

Upvotes: 1

ShellRox
ShellRox

Reputation: 2602

You can use Kill to terminate program by its process Id, Top command will list all the processes, You can also use Pkill, which will Terminate the process by its name.

-9 option forces process to shut down, so its very commonly used.

Example:

kill -9 "Process ID without Quotation marks"

pkill -9 "Name with Quotation marks (Case Sensitive)"


Check this.

Upvotes: 1

Related Questions