I am trying to format the output of netstat or ss command in bash terminal. I need to convert the port numbers to hexadecimal. Currently they are shown in decimal by default. Is there any option in either these commands to display ports in hexadecimal format?

Edit: I used netstat -tulpn for the below ourput

enter image description here

  • 3
    Welcome to the site. To make it easier for contributors to help you, please avoid attaching screenshots of console output whenever possible, and copy-and-paste the console output instead. Also, please edit your question to include the command-line you used to produce the above output; it will help contributors point you in the right direction. – AdminBee Jan 24 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.