How to check which localhost's ports are used on the terminal? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm working on the Linux Ubuntu terminal and I'm wondering how to check directly on terminal which localhost ports are used please ?










share|improve this question















closed as unclear what you're asking by Goro, sebasth, Jeff Schaller, RalfFriedl, Archemar Sep 20 at 9:56


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




    "used" in what way? something's listening there for incoming connections? Or there's a connection using that port?
    – Jeff Schaller
    Sep 19 at 17:48










  • Possible duplicate of why ss(8) understands listening UDP ports differently than netstat(8)?
    – Fabby
    Sep 19 at 17:49














up vote
0
down vote

favorite












I'm working on the Linux Ubuntu terminal and I'm wondering how to check directly on terminal which localhost ports are used please ?










share|improve this question















closed as unclear what you're asking by Goro, sebasth, Jeff Schaller, RalfFriedl, Archemar Sep 20 at 9:56


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




    "used" in what way? something's listening there for incoming connections? Or there's a connection using that port?
    – Jeff Schaller
    Sep 19 at 17:48










  • Possible duplicate of why ss(8) understands listening UDP ports differently than netstat(8)?
    – Fabby
    Sep 19 at 17:49












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm working on the Linux Ubuntu terminal and I'm wondering how to check directly on terminal which localhost ports are used please ?










share|improve this question















I'm working on the Linux Ubuntu terminal and I'm wondering how to check directly on terminal which localhost ports are used please ?







linux networking port






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 19 at 17:49









Tomasz

8,43552560




8,43552560










asked Sep 19 at 17:39









Webman

1577




1577




closed as unclear what you're asking by Goro, sebasth, Jeff Schaller, RalfFriedl, Archemar Sep 20 at 9:56


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.






closed as unclear what you're asking by Goro, sebasth, Jeff Schaller, RalfFriedl, Archemar Sep 20 at 9:56


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




    "used" in what way? something's listening there for incoming connections? Or there's a connection using that port?
    – Jeff Schaller
    Sep 19 at 17:48










  • Possible duplicate of why ss(8) understands listening UDP ports differently than netstat(8)?
    – Fabby
    Sep 19 at 17:49












  • 1




    "used" in what way? something's listening there for incoming connections? Or there's a connection using that port?
    – Jeff Schaller
    Sep 19 at 17:48










  • Possible duplicate of why ss(8) understands listening UDP ports differently than netstat(8)?
    – Fabby
    Sep 19 at 17:49







1




1




"used" in what way? something's listening there for incoming connections? Or there's a connection using that port?
– Jeff Schaller
Sep 19 at 17:48




"used" in what way? something's listening there for incoming connections? Or there's a connection using that port?
– Jeff Schaller
Sep 19 at 17:48












Possible duplicate of why ss(8) understands listening UDP ports differently than netstat(8)?
– Fabby
Sep 19 at 17:49




Possible duplicate of why ss(8) understands listening UDP ports differently than netstat(8)?
– Fabby
Sep 19 at 17:49










2 Answers
2






active

oldest

votes

















up vote
2
down vote













You can use use the ss command.



$ ss -natu


The n option means don't translate addresses to names. The a options means show all (listening and non-listening) connections. The t option means TCP connections. The 'u' option means show UDP connections.



Note that ss might not be in your path by default. For example, you might need to run /sbin/ss.






share|improve this answer





























    up vote
    0
    down vote













    There's netstat for this. Try:



    netstat -apv


    Or better:



    sudo netstat -apv


    sudo, becuase some entries may be masked for security reasons. a for all. p for program names. v for more verbose output.






    share|improve this answer




















    • Netstat is deprecated on Debian. Use ss instead...
      – Fabby
      Sep 19 at 17:49






    • 1




      @Fabby I'm still with the old, though I've heard about ss. Is Netstat really as much as deprecated? Can you post a link to this?
      – Tomasz
      Sep 19 at 17:52










    • man netstat under Debian.
      – Fabby
      Sep 19 at 18:03






    • 1




      @Fabby I've got it in the NOTES: This program is mostly obsolete. (...) Cheers.
      – Tomasz
      Sep 19 at 18:04

















    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    You can use use the ss command.



    $ ss -natu


    The n option means don't translate addresses to names. The a options means show all (listening and non-listening) connections. The t option means TCP connections. The 'u' option means show UDP connections.



    Note that ss might not be in your path by default. For example, you might need to run /sbin/ss.






    share|improve this answer


























      up vote
      2
      down vote













      You can use use the ss command.



      $ ss -natu


      The n option means don't translate addresses to names. The a options means show all (listening and non-listening) connections. The t option means TCP connections. The 'u' option means show UDP connections.



      Note that ss might not be in your path by default. For example, you might need to run /sbin/ss.






      share|improve this answer
























        up vote
        2
        down vote










        up vote
        2
        down vote









        You can use use the ss command.



        $ ss -natu


        The n option means don't translate addresses to names. The a options means show all (listening and non-listening) connections. The t option means TCP connections. The 'u' option means show UDP connections.



        Note that ss might not be in your path by default. For example, you might need to run /sbin/ss.






        share|improve this answer














        You can use use the ss command.



        $ ss -natu


        The n option means don't translate addresses to names. The a options means show all (listening and non-listening) connections. The t option means TCP connections. The 'u' option means show UDP connections.



        Note that ss might not be in your path by default. For example, you might need to run /sbin/ss.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Sep 19 at 17:52

























        answered Sep 19 at 17:49









        Andy Dalton

        4,8691520




        4,8691520






















            up vote
            0
            down vote













            There's netstat for this. Try:



            netstat -apv


            Or better:



            sudo netstat -apv


            sudo, becuase some entries may be masked for security reasons. a for all. p for program names. v for more verbose output.






            share|improve this answer




















            • Netstat is deprecated on Debian. Use ss instead...
              – Fabby
              Sep 19 at 17:49






            • 1




              @Fabby I'm still with the old, though I've heard about ss. Is Netstat really as much as deprecated? Can you post a link to this?
              – Tomasz
              Sep 19 at 17:52










            • man netstat under Debian.
              – Fabby
              Sep 19 at 18:03






            • 1




              @Fabby I've got it in the NOTES: This program is mostly obsolete. (...) Cheers.
              – Tomasz
              Sep 19 at 18:04














            up vote
            0
            down vote













            There's netstat for this. Try:



            netstat -apv


            Or better:



            sudo netstat -apv


            sudo, becuase some entries may be masked for security reasons. a for all. p for program names. v for more verbose output.






            share|improve this answer




















            • Netstat is deprecated on Debian. Use ss instead...
              – Fabby
              Sep 19 at 17:49






            • 1




              @Fabby I'm still with the old, though I've heard about ss. Is Netstat really as much as deprecated? Can you post a link to this?
              – Tomasz
              Sep 19 at 17:52










            • man netstat under Debian.
              – Fabby
              Sep 19 at 18:03






            • 1




              @Fabby I've got it in the NOTES: This program is mostly obsolete. (...) Cheers.
              – Tomasz
              Sep 19 at 18:04












            up vote
            0
            down vote










            up vote
            0
            down vote









            There's netstat for this. Try:



            netstat -apv


            Or better:



            sudo netstat -apv


            sudo, becuase some entries may be masked for security reasons. a for all. p for program names. v for more verbose output.






            share|improve this answer












            There's netstat for this. Try:



            netstat -apv


            Or better:



            sudo netstat -apv


            sudo, becuase some entries may be masked for security reasons. a for all. p for program names. v for more verbose output.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 19 at 17:49









            Tomasz

            8,43552560




            8,43552560











            • Netstat is deprecated on Debian. Use ss instead...
              – Fabby
              Sep 19 at 17:49






            • 1




              @Fabby I'm still with the old, though I've heard about ss. Is Netstat really as much as deprecated? Can you post a link to this?
              – Tomasz
              Sep 19 at 17:52










            • man netstat under Debian.
              – Fabby
              Sep 19 at 18:03






            • 1




              @Fabby I've got it in the NOTES: This program is mostly obsolete. (...) Cheers.
              – Tomasz
              Sep 19 at 18:04
















            • Netstat is deprecated on Debian. Use ss instead...
              – Fabby
              Sep 19 at 17:49






            • 1




              @Fabby I'm still with the old, though I've heard about ss. Is Netstat really as much as deprecated? Can you post a link to this?
              – Tomasz
              Sep 19 at 17:52










            • man netstat under Debian.
              – Fabby
              Sep 19 at 18:03






            • 1




              @Fabby I've got it in the NOTES: This program is mostly obsolete. (...) Cheers.
              – Tomasz
              Sep 19 at 18:04















            Netstat is deprecated on Debian. Use ss instead...
            – Fabby
            Sep 19 at 17:49




            Netstat is deprecated on Debian. Use ss instead...
            – Fabby
            Sep 19 at 17:49




            1




            1




            @Fabby I'm still with the old, though I've heard about ss. Is Netstat really as much as deprecated? Can you post a link to this?
            – Tomasz
            Sep 19 at 17:52




            @Fabby I'm still with the old, though I've heard about ss. Is Netstat really as much as deprecated? Can you post a link to this?
            – Tomasz
            Sep 19 at 17:52












            man netstat under Debian.
            – Fabby
            Sep 19 at 18:03




            man netstat under Debian.
            – Fabby
            Sep 19 at 18:03




            1




            1




            @Fabby I've got it in the NOTES: This program is mostly obsolete. (...) Cheers.
            – Tomasz
            Sep 19 at 18:04




            @Fabby I've got it in the NOTES: This program is mostly obsolete. (...) Cheers.
            – Tomasz
            Sep 19 at 18:04


            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay