Use the command
sudo netstat -plten |grep java
used grep java
as tomcat
uses java
as their processes.
It will show the list of processes with port number and process id
tcp6 0 0 :::8080 :::* LISTEN 1000 30070621 16085/java
the number before /java
is a process id. Now use kill
command to kill the process
kill -9 16085
-9
implies the process will be killed forcefully.
Related Posts:
- How do I do ‘mount –bind’ in /etc/fstab?
- How to pretty print XML from the command line?
- Why does ENOENT mean “No such file or directory”?
- sudo: npm: command not found
- What are file descriptors, explained in simple terms?
- How do I grep recursively?
- How do I grep recursively?
- What is the meaning of *nix?
- Display exact matches only with grep
- How do I grep recursively?
- How to split a delimited string into an array in awk?
- How do I use grep to search the current directory for all files having the a string “hello” yet display only .h and .cc files?
- SSH using python script
- Display exact matches only with grep
- How can I exclude directories from grep -R?
- How can I exclude directories from grep -R?
- Argument list too long error for rm, cp, mv commands
- Difference between using “chmod a+x” and “chmod 755”
- What does ^M character mean in Vim?
- Who can access a file with octal permissions “000” on Linux/UNIX?
- What does it mean to write to stdout in C?
- What do ‘real’, ‘user’ and ‘sys’ mean in the output of time(1)?
- How to cat <
> a file containing code? - mkdir’s “-p” option
- Extract file basename without path and extension in bash
- Given two directory trees, how can I find out which files differ by content?
- wait(null) and wait(&status) C language and Status
- Shell script “for” loop syntax
- Diff command along with Grep gives “Binary file (standard input) matches”
- What can cause a “Resource temporarily unavailable” on sock send() command
- How to get the current directory in a C program?
- How to download a file from server using SSH?
- When could or should I use chmod g+s on a file or directory?
- How to Sum a column in AWK?
- Equivalent of *Nix ‘which’ command in PowerShell?
- What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?
- What is the difference between SIGSTOP and SIGTSTP?
- How to colorize diff on the command line
- How to colorize diff on the command line
- How to read a file into a variable in shell?
- Why should we check WIFEXITED after wait in order to kill child processes in Linux system call?
- What does `set -x` do?
- Command to change the default home directory of a user
- gpg decryption fails with no secret key error
- Using ls to list directories and their total sizes
- What is the difference between tar and zip?
- Display current path in terminal only
- What does “&” at the end of a linux command mean?
- Can’t remove a directory in Unix
- Syntax error near unexpected token ‘then’
- What do the dup() and dup2() systems really do?
- C fopen vs open
- What is `S_ISREG()`, and what does it do?
- What generates the “text file busy” message in Unix?
- Reasoning behind C sockets sockaddr and sockaddr_storage
- Restarting cron after changing crontab file?
- How do I write stderr to a file while using “tee” with a pipe?
- cd into directory without having permission
- How can I send an email through the UNIX mailx command?
- Rename multiple files based on pattern in Unix
- What is the difference between a symbolic link and a hard link?
- SCP Permission denied (publickey). on EC2 only when using -r flag on directories
- binary operator expected error when checking if a file with full pathname exists
- What is special about /dev/tty?
- Copying a large directory tree locally? cp or rsync?
- Can I nohup/screen an already-started process?
- Check if port is open or closed on a Linux server?
- Environment variables of a running process on Unix?
- In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?
- How to read backward from the end of file in less or more?
- When does /tmp get cleared?
- SSL Certificate Location on UNIX/Linux
- Is it possible to detach a process from its terminal? (Or, “I should have used screen!”) [duplicate]
- What does ‘set -e’ do, and why might it be considered dangerous?
- Meaning of directories on Unix and Unix like systems
- How to remove empty/blank lines from a file in Unix (including spaces)?
- How to forcibly close a socket in TIME_WAIT?
- How can I rename a Unix user?
- How to get pid of just started process
- Can you have more than one ~/.ssh/config file?
- How to disable everything in crontab -l?
- What is the maximum port number?
- How to sort ps output by process start time?
- How to check what port mysql is running on
- Getting the last match in a file using grep
- How do I pause my shell script for a second before continuing?
- error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ — Missing /var/run/mysqld/mysqld.sock
- MySQL config file location – redhat linux server
- What is the reason and how to avoid the [FIN, ACK] , [RST] and [RST, ACK]
- execvp: bad address error
- WordPress Job Interview Preparation
- A /proc folder in wp-content?
- How do I get the current Unix time in milliseconds in Bash?
- Moving an already-running process to Screen
- Permission denied (publickey). SSH from local Ubuntu to Amazon EC2 server
- LVM dangers and caveats
- How to know from which yum repository a package has been installed?
- tar – Remove leading directory components on extraction
- How to list Apache enabled modules?
- How can I monitor hard disk load on Linux?