This beginner's walkthrough makes a tiny website in a safe practice directory. No expensive IDE, no live-server changes, and no need to hand your entire machine to an AI.
What we're making
You'll use OpenAI Codex CLI on Slackware to build a small, self-contained HTML/CSS page called My Terminal Cheat Sheet. Codex can inspect files, propose edits and run commands with permission. The program runs locally; its AI model is accessed over the internet.
What you need
Slackware or another Linux system, internet, curl, and a Codex-enabled ChatGPT account or separately billed API access.
What you don't need
A Windows desktop, a paid code editor, administrator access for every task, or experience writing JavaScript.
Don't run Codex as root. We'll create a fresh practice folder and keep all work there. Don't aim the agent at public_html or private photo folders for this tutorial.
See what Slackware is running
Open Konsole in Fluxbox, or log into a text console. These checks are harmless:
whoami
uname -m
command -v curl
command -v git
command -v python3
whoami should print your normal username. uname -m might say x86_64 on an Intel or AMD PC. If Git or Python is missing, you can still get Codex working; those tools just make our little project easier to inspect.
Install Codex from the official source
OpenAI offers a standalone installer for Linux. Download it into a temporary practice directory so you can inspect the script first:
mkdir -p ~/codex-install-check
cd ~/codex-install-check
curl -fsSL https://chatgpt.com/codex/install.sh -o install.sh
less install.sh
Press q to quit less. If you trust the official source and have reviewed the installer, run:
sh install.sh
codex --version
If the shell says codex: command not found, open a fresh shell and try again. Installation paths and versions can change.
Already installed it? Great — skip straight to sign-in. If you prefer npm and already have a compatible Node.js toolchain, OpenAI also documents npm install -g @openai/codex.
Use your ChatGPT account
From Fluxbox/Konsole, where Firefox is available:
codex login
codex login status
Complete the browser sign-in, then return to the terminal. Codex access and usage limits depend on your plan; using an API key instead may incur separate API charges.
You can try codex login --device-auth and complete the one-time code using a browser on another device. Device authorization may need enabling in your ChatGPT security settings. If that method is unavailable, use the normal browser login from Fluxbox first.
Build your own tiny Linux learning page
Give Codex a folder that contains only your training project. A separate folder is a much safer place to experiment than your actual web hosting directory.
mkdir -p ~/codex-lab
cd ~/codex-lab
printf '# My Codex practice lab\n' > README.md
codex
In the interactive Codex prompt, paste this task. It's specific about what you want and sets sensible boundaries:
I'm learning Slackware Linux. In this directory only, create a beginner-friendly, mobile-readable terminal cheat sheet website with index.html and style.css. Use a dark background, readable green terminal accents and explanations of ls, cd, pwd, mkdir and grep. Use plain HTML and CSS; no external libraries or remote scripts. First explain your plan. Ask before running commands or changing files. Never touch files outside this project folder.
Watch what Codex proposes. Read any approval request before accepting it. AI-generated code can contain mistakes; a good result is one you understand and can safely test.
See exactly what changed
Exit the Codex session or open a second terminal in your project folder:
cd ~/codex-lab
ls -lah
sed -n '1,50p' index.html
sed -n '1,50p' style.css
Use Firefox to preview the files by serving them only to your own machine:
python3 -m http.server 8000 --bind 127.0.0.1
In Firefox, open http://127.0.0.1:8000/. Press Ctrl + C in the terminal to stop the preview. This does not upload anything to DarkPC.net.
Tell Codex: “Review these two files for broken links, accessibility problems and unclear instructions. Explain the problems before proposing fixes.” Then inspect the changes rather than approving everything blindly.
Run Codex without Fluxbox
After authenticating, you can try a real Linux console. Press Ctrl + Alt + F2 to enter a text TTY, then log in as the same ordinary user:
cd ~/codex-lab
codex
If the interactive interface doesn't display properly in your TTY, try:
codex --no-alt-screen
You can also ask a question without opening the full interactive interface:
codex exec "Explain the purpose of /etc/fstab on Linux. Do not change files."
Codex is a text-based terminal application; framebuffer image viewers such as fbi are separate programs. You can use the same computer without needing an entire graphical desktop, but results vary with terminals and installed tools.
See our companion guide AI in the framebuffer console for the DarkPC hands-on Slackware story, sign-in notes, AGENTS.md and terminal troubleshooting.
Make a checkpoint before the next experiment
Git is handy, but you don't need to learn every Git command today. If it is installed, you can start a simple history for your practice folder:
cd ~/codex-lab
git init
git add README.md index.html style.css
git diff --cached
git commit -m "My first Codex terminal cheat sheet"
git diff --cached lets you review the files before committing. If Git asks for an author name or email, configure those for your repository before committing. Don't commit passwords, API keys or private photographs.
Troubleshooting
codex: command not found
Open a new shell; inspect your PATH with echo "$PATH". Confirm the official installer actually completed. The standalone installer does not require you to install npm first.
Codex can't sign in at the text console
Use codex login while Firefox is available in Fluxbox, then switch back to the TTY after successful sign-in. The text console itself may not be able to launch a browser.
The preview doesn't open
Check whether python3 is installed and the local server is still running. In Firefox visit http://127.0.0.1:8000/ on the same computer. If port 8000 is already used, choose another local port.
What if Codex wants to run a dangerous command?
Don't approve it. Ask for a read-only explanation or a safer alternative. Back up important files first, and never grant unrestricted permissions just to skip prompts.
Can Codex make images directly?
Codex is primarily a coding agent. It can help work with image files or scripts, but image creation requires an image-generation capability or service that is actually configured and authorised. Don't assume any new image was generated until a real output file exists.
You just crossed two computing eras
Slackware gives you the classic Linux experience: text consoles, plain configuration files and control over your system. Codex adds an assistant that can help build and explain software. The useful trick is to keep the human in charge.
Official references
- OpenAI Codex on GitHub — current Linux installation methods.
- Codex CLI documentation — interactive use, commands and workflow.
- Codex command-line reference — login,
execand terminal options. - Codex and ChatGPT plans — eligibility, access and plan limits.
Updated 9 November 2026. DarkPC.net is an independent learning website and is not affiliated with OpenAI. Command options, versions and account access may change; check the linked official docs.