A real Linux terminal in your browser. Full bash profile, aliases, and environment variables loaded. Hostname and username masked for screencasts and demos.
- Real bash shell — Interactive PTY via
node-pty - Full profile loading —
.bashrc,.bash_profile,.bash_aliasesloaded automatically - Identity masking — Fake username and hostname in prompt for privacy
- xterm.js UI — Modern, responsive terminal emulator
- WebSocket — Real-time bidirectional communication
- Configurable — Environment variables for customization
git clone https://github.com/JeanSebastienBash/WebTerminal.git
cd WebTerminal
npm installCopy .env.example to .env and customize:
cp .env.example .envEdit .env:
PORT=3000
FAKE_USERNAME=dev
FAKE_HOSTNAME=workstationnpm run devnpm startOpen your browser to http://localhost:3000
To stop the server and release resources:
# If running with npm start / npm run dev
Ctrl+C
# Or force kill if needed
pkill -f "node.*server"- Browser connects via WebSocket
- Server spawns a bash PTY with your home directory
- Your bash profile is sourced (
.bashrc,.bash_profile,.bash_aliases) - Prompt is overridden with masked identity
- All commands execute in your real shell with full access to your environment
- Node.js >= 18.0.0
- Linux/macOS (for
node-ptysupport) - Bash shell
- Only run on trusted networks
- Consider adding authentication for production use
- Never expose publicly without security measures
WebTerminal/
├── src/
│ └── server.js # Express + WebSocket server
├── public/
│ ├── lib/ # xterm.js bundles
│ └── index.html # Terminal UI
├── .env.example # Configuration template
├── .gitignore
├── LICENSE
├── package.json
└── README.md
MIT License — see LICENSE file
Made by DreamprojectAI