simplehttpserver
Serve files via Python HTTP server
TLDR
Serve current directory
SYNOPSIS
python -m SimpleHTTPServer [port]
python3 -m http.server [--bind address] [port]
DESCRIPTION
SimpleHTTPServer is a Python standard library module that launches a basic HTTP server for serving static files from the current directory. It requires no installation or configuration, making it ideal for quick file sharing, local development, and testing.
In Python 2, the module is invoked as python -m SimpleHTTPServer, while Python 3 renamed it to python3 -m http.server. The server provides directory listings in a web browser and handles GET requests for file downloads. It binds to all interfaces on port 8000 by default, but the port and bind address can be customized.
PARAMETERS
port
Port number (default 8000).--bind ADDRESS
Bind address (Python 3).--directory DIR
Serve directory (Python 3.7+).
CAVEATS
Not for production. No security features. Python 2 deprecated.
HISTORY
SimpleHTTPServer is a Python 2 standard library module. Python 3 renamed it to http.server.
SEE ALSO
python(1), serve(1), http-server(1)
