---
title: Introduction to Hacking - Port scanning
show-content: 1
layout: console
---

The point of port scanning a server is to detected its open ports and the port's
listening services. Once a hacker knows all the vulnerabilities they might have
and exploit them to take control of your website. In the port scannign example,
we will use the most popular port scanner: Nmap. The Nmap Security Scanner is
available for Linux and other operating systems. To install it run the following
commands:

If you are running an Arch-based distribution:

```bash
sudo pacman -S nmap
```

If you are running a Debian-based distribution:

```bash
sudo apt install nmap
```

If you are running Void linux;

```bash
sudo xbps-install nmap
```

If you are running Gentoo:

```bash
emerge nmap
```

To perform a fast scan in Nmap execute the following command:

```bash
nmap -F <target url>
```

And the result of a fast scan might look like the following:

```bash
PORT     STATE          SERVICE
80/tcp   open           http
443/tcp  open           https
```

There a lot more types of scans and interesting functionalities, learning how to
properly use nmap is completely worth your time.

[Index](/blog/intro_hacking/index)
