Check if port is available

    0

    0

    The user runs the sudo nc command, specifying the localhost address and port number 56733. The user then sends a blank string to the nc command as a command parameter, and the nc command prints 0. This indicates that the command succeeded.

    sudo nc localhost 56733 < /dev/null; echo $?
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.