How To: Confirm which Ports are Open on Your Linux System
If you wish to see which ports are open on your Linux system, perhaps to check your configuration, you can use the nmap tool. It’s a powerful tool, but we’ll focus on just this simple task.
If you don’t have nmap, first install it. For example, on Ubuntu just run sudo apt-get install nmap. On Fedora it should be sudo yum install nmap. On Arch it should be sudo pacman -Sy nmap.
Once you’ve got nmap just run this simple command. Note that we’re running it with superuser privileges (sudo), which is necessary.
Your output may look something like this:
So it shows you the open port numbers and the service that is using each. The above is pretty standard stuff. If you don’t see what you expected you should check your configuration.
If you’d like to do more with nmap you can explore the nmap built in documentation by running man nmap, which contains a breadth of information.
See Also
If you wish to see which ports are open on your Linux system, perhaps to check your configuration, you can use the nmap tool. It’s a powerful tool, but we’ll focus on just this simple task.
If you don’t have nmap, first install it. For example, on Ubuntu just run sudo apt-get install nmap. On Fedora it should be sudo yum install nmap. On Arch it should be sudo pacman -Sy nmap.
Once you’ve got nmap just run this simple command. Note that we’re running it with superuser privileges (sudo), which is necessary.
Your output may look something like this:
So it shows you the open port numbers and the service that is using each. The above is pretty standard stuff. If you don’t see what you expected you should check your configuration.
If you’d like to do more with nmap you can explore the nmap built in documentation by running man nmap, which contains a breadth of information.