In order to kill a running process on Ubuntu Linux, you can make use of the kill or command.
Step 1: Identify the PID (Process ID) for the running process to be killed.
% ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 09:04 pts/0 00:00:00 /bin/bash
root 244 1 0 09:06 pts/0 00:00:00 sh
root 250 244 0 09:07 pts/0 00:00:00 bash
root 440 250 0 10:14 pts/0 00:00:00 sh
root 449 440 0 11:35 pts/0 00:00:00 ps -ef
Step 2: Execute the kill command
% kill -9 440
killed!
Step 3: Verify that the running process is killed!
# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 09:04 pts/0 00:00:00 /bin/bash
root 244 1 0 09:06 pts/0 00:00:00 sh
root 250 244 0 09:07 pts/0 00:00:00 bash
root 450 250 0 11:38 pts/0 00:00:00 ps -ef

-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Ubuntu,
- Install Oh My Zsh on Ubuntu Docker complete steps
- Installing Home-brew on Ubuntu
- Install Golang (Go) on Ubuntu
- Install specific JRE on Ubuntu using apt
- How to stop/start/restart apache server using command [Ubuntu]
- How to install zsh shell on Ubuntu
- Quick steps to install Nginx on Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- Add new user in Ubuntu Linux using Terminal Command
- Fix Ubuntu /bin/sh: 1: zsh: not found error
- How to install Python on Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to stop MongoDB Server running on Ubuntu
- Install postgres Client using apt-get command
- How to kill service running on a port on Ubuntu Linux
- [fix] openssl No such file or directory error C++
- Fix - sudo: systemctl: command not found
- Access Windows share folder in Ubuntu Device in Network
- Add or remove users from sudo group - Ubuntu
- Quickly install Apache Server on Ubuntu Linux
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
More Posts:
- [Ubuntu] Search a package and versions using apt command - Linux
- How to convert Java LocalDateTime to Timestamp Object with Examples - Java
- [Fix] Java - Exception in thread main java.lang.IllegalThreadStateException - Java
- Deploy SharePoint wsp solution package using PowerShell - SharePoint
- Install and Run Jupyter Notebook on Mac (macOS) - Python
- How to fix Microsoft Teams Error Code caa70004 - Teams
- Bootstrap Button Colors Classes - Bootstrap
- How to hide or remove quick launch left navigation from SharePoint Online Modern site page - SharePoint