Find the answer to your Linux question:
Results 1 to 3 of 3
How to find free ports, which will be used by my application? netstat -a gives only used ports ....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758

    Exclamation How to find free ports?


    How to find free ports, which will be used by my application? netstat -a gives only used ports .
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Not sure I understand totally what you are looking for here.

    Ports 1024 and below are assigned ports. Ports above this are open and can be used. If netstat doesn't show them then they are available.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Ports 1024 and below are assigned ports. Ports above this are open and can be used. If netstat doesn't show them then they are available.
    Robert,thanks for your replies. To explain more about my question, Is it possible to get free port without using logic "get used ports and from there find unused ports" .

    any command (say free_ports) will give me list of free ports ?

    ps: It's not an urgent question for my work,just curious about such command.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •