Network and internet

Run a local web server

Serve the files in a folder at a localhost address, so you can open them in your browser.

Fill these in once
  1. Start serving this folder
    Terminal
    python3 -m http.server 8000

    Then open http://localhost:8000 in your browser (or your own port number). Press Ctrl+C to stop.

  1. Start serving this folder
    Terminal · Ubuntu / Debian
    python3 -m http.server 8000

    Then open http://localhost:8000 in your browser (or your own port number). Press Ctrl+C to stop.

  1. Start serving this folder
    PowerShell
    python -m http.server 8000

    Needs Python (see “Install Python and start a project”). Then open http://localhost:8000 (or your own port number). Press Ctrl+C to stop.

New to localhost? I explain it in plain English on Layman Terms.