0

I want to run this command in Ubuntu:

tcp 0 0 0.0.0.0:50010 0.0.0.0:* LISTEN <pid>/java

but tcp is not recognized in Ubuntu. What could be an alternative for this?

closed as unclear what you're asking by Kiwy, Jeff Schaller, meuh, G-Man, forcefsck Apr 29 '18 at 21:24

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    That's output from netstat. Also try ss. – dsstorefile1 Apr 29 '18 at 13:03
  • 1
    Why do you want to run that command? As noted above, this is output from another command, and includes java as the only executable part of it. Are you wanting to write a java program that listens on port 50010? Please spell out your situation. – Jeff Schaller Apr 29 '18 at 13:43
1

I think you can find solution using this guide.

Use netstat command

  1. Listing all the LISTENING Ports of TCP and UDP connections

    Listing all ports (both TCP and UDP) using netstat -a option.

  2. Listing TCP Ports connections

    Listing only TCP (Transmission Control Protocol) port connections using netstat -at.

Link:

20 Netstat Commands for Linux Network Management

Not the answer you're looking for? Browse other questions tagged or ask your own question.