If you have a service running on your system on a certain port and you want to kill it using bash you can make use of the kill command, the kill command can send a signal to a process to terminate it,Example:
Say I have MySQL running on port 3306 or tomcat on 8080 and I want to kill it,
$ kill $(lsof -t -i:3306)
$ kill $(lsof -t -i:8080)
lsof: list open files
-t: to produce an output of lsof without headers with just the process identifier (PID)
Have Questions? Post them here!
- How to see Created Accessed Modified and Changed dates of a file using bash terminal command
- How to Kill a port using bash terminal command?
- 'pwd' is not recognized as an internal or external command, operable program or batch file. [Windows]
- bash get year 2021 calendar
- How to create new user account in Windows bash
- How to start or open a new bourne-again shell (bash) session on Windows using Command Line CMD
- How to check your IP using bash for Windows?
- Your JBoss Application Server 7 is running However you have not yet added any users to be able to access the admin console - Java
- Android : Connection with adb was interrupted 0 attempts have been made to reconnect - Android
- Java XML-RPC java.net.BindException: Address already in use - Java
- New-SPLogFile PowerShell - create new SharePoint log file - SharePoint
- Error : Facebook SDK AndroidRuntime?FATAL EXCEPTION: main - Android