# Network Port

> A number that says which app should get the data. Each app has its own.

**Field:** Infrastructure  
**Category:** Networking  
**Also known as:** Port, Port Number, TCP Port

## Think of it like

Think of it like a flat number in a big block. The street address finds the building, and the flat number finds the door.

## Definition

A port is a number that says which program on a computer should get some data. The IP address finds the computer, and the port finds the program on it. Ports run from 0 to 65535. Some have fixed jobs: web pages use 80, secure web pages use 443 and SSH uses 22. A program listens on a port and answers whatever arrives there.

## Example

Jack runs an app on a laptop on port 3000. Jack opens localhost:3000 in the browser to see it.

## Example code

```url
http://localhost:3000/
```

The number after the colon is the port the app listens on.

## Why it matters

Every server program needs a port. Closing the ones you do not use is a basic safety step.

## Common mistake

Starting two programs on the same port. The second one fails with an address in use error.

## Three principles

- **Picks the program.** The IP picks the computer.
- **0 to 65535.** Some numbers have fixed jobs.
- **Programs listen.** And answer what arrives.

## Related terms

- [Internet Protocol Address (IP Address)](https://learn.benibix.com/term/infrastructure/ip-address)
- [HyperText Transfer Protocol (HTTP)](https://learn.benibix.com/term/infrastructure/http)
- [HyperText Transfer Protocol Secure (HTTPS)](https://learn.benibix.com/term/infrastructure/https)
- [Uniform Resource Locator (URL)](https://learn.benibix.com/term/general/url)
- [Firewall](https://learn.benibix.com/term/infrastructure/firewall)
- [Container Port Mapping](https://learn.benibix.com/term/infrastructure/container-port-mapping)

## Taught in

- [Network Ports, 80 and 443](https://learn.benibix.com/learn/infrastructure-networking/network-ports-80-and-443): Computer Networking, 5/13
- [UFW and Linux Firewalls](https://learn.benibix.com/learn/infrastructure-linux/ufw-and-linux-firewalls): Linux CLI, 10/10
- [Cloud Firewall and Floating IP](https://learn.benibix.com/learn/infrastructure-vps/cloud-firewall-and-floating-ip): VPS, 6/7
- [SSH Client and Server](https://learn.benibix.com/learn/infrastructure-ssh/ssh-client-and-server): SSH, 1/9

---

Source: https://learn.benibix.com/term/infrastructure/port
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
