When you are running multiple instances of Python, it can be difficult to find all of the instances to stop them. In the Ubuntu Linux operating system, each instance of an application or process has a unique ID. You can stop all instances of a particular process, such as Python, without knowing the ID of each process by using the "pkill" command, which locates all of the processes that match the criteria given and kills each one. The "pgrep" command will output the process IDs based on the criteria given.
- Skill level:
Right-click on the desktop and choose the "Terminal" option to open a terminal window.
Type the command "sudo pkill python" to kill all of the Python processes running, regardless of the user who started the process.
Type your password when prompted.
Type the command "sudo pgrep python" to ensure that all Python processes have been stopped. There should be no output for this command, and you will not be prompted for a password.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for