An interactive Linux Terminal simulator built entirely inside a PDF file using Adobe Acrobat JavaScript (AcroForms).
No installation, no internet, and no virtual machines required. Just open the PDF and start typing Linux commands!
Check out the full capabilities of Linux.pdf in action:
Since this project relies heavily on advanced Acrobat JavaScript (AcroForms), performance and functionality vary depending on the PDF reader you use:
- Adobe Acrobat Reader (Desktop) - Smooth performance and 100% features support.
- PDF-XChange Editor - Excellent script execution.
- Firefox - It usually works correctly.
- Modern Web Browsers (Chrome, Edge, Opera) - Will run the core simulation but you might experience slight rendering lag or minor feature restrictions eg. sending the command with Enter.
In my experience, I used this method; there are other shorter methods, but this one is free :)
- From
Formadd:Text Box, with nameCommandLine(The inputs bar)Push Button, with nameSubmitButton(Enter button)
- Design your file as you wish (im not good at it).
In base.js you need to edit the TERMINAL_HEIGHT variable to the size of terminal you will make.
var TERMINAL_HEIGHT = 28; // 28 lines only in my case- Go to
Form - Create
Text, with properties:- Field Name:
TerminalScreen - Read Only: Yes
- Check Spelling: No
- Multi Line: Yes
- Field Name:
- Click
Document JavaScript>Add> Paste the code of base.js - Click
Select Fields - Edit properties:
- For
TerminalScreen- Change
ValidationtoCustom Action. - In
Validation Actionpaste the code of process_command.js
- Change
- For
SubmitButtonActions>Mouse Down>Add>Run a JavaScriptActions>Mouse Down>Reset a Form> Deselect "TerminalScreen"- And paste the code of process_command.js
- For
Currently, Linux.pdf supports a variety of core Unix commands:
ls- List directory contents (supports relative paths likels folder/sub).cd- Change directories (supports..and deep path navigation).pwd- Print current working directory.touch/mkdir- Create files and directories dynamically in memory.cat/head/tail- View and read simulated file contents.echo- Display text or redirect output to files using>.cp/mv- Copy, move, or rename items within the simulated filesystem.rm/rmdir- Delete files or empty directories securely.clear,help,whoami,uname,man.
This project is open-source and available under the MIT License.

