Windows commands
- 1. Get the help of a command
- Syntax
- # command ?/
- Example:
- # taskkill ?/
- Displays the usage of the taskkill command.
- 2. List all the process running on the windows system.
- Syntax
- # tasklist
- # tasklist /FI "IMAGENAME eq java.exe" - This command list all the process where the image name is java.exe
- 3. Kill specific process in the command prompt?
- Example:
- # taskkill /PID process_id
- # taskkill /PID 8760
- This command kills the process whose id is 8760.
- 4. Kill all java process running on the system.
- Example:
- taskkill /F /IM java.exe
- /F – Delete java.exe process forcefully.
- /IM – Image name of the process
- 5. List out all TCP/IP connections.
- Syntax
- # netstat
- Example:
- # netstat –aon
- a – List all TCP/IP connections and listening ports.
- o – Display process id associated with each connection.
- n – Display addresses and port numbers in Numerical format.
- 6. Find out a process running on specific port.
- Syntax
- # netstat
- Example:
- # netstat –aon | findstr 0.0.8080
- Consider that Tomcat is running on the 8080 port. The output of the above command is