Skip to content

Instantly share code, notes, and snippets.

@mohamed-ea
Created September 11, 2023 08:42
Show Gist options
  • Save mohamed-ea/ecfe67afdaf6248374ea2e8ac096e23f to your computer and use it in GitHub Desktop.
Save mohamed-ea/ecfe67afdaf6248374ea2e8ac096e23f to your computer and use it in GitHub Desktop.
linux commands: Used ports
# To check the listening ports and applications on Linux:
# Open a terminal application i.e. shell prompt.
# Run any one of the following command on Linux to see open ports:
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo ss -tulpn | grep LISTEN
sudo lsof -i:22 ## see a specific port such as 22 ##
sudo nmap -sTU -O IP-address-Here
# For the latest version of Linux use the ss command. For example:
ss -tulw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment