This page covers the live-session path: open one shell, inspect the box, adjust things as you go, and keep shell-local state between commands.
Open a shell with the CLI
run9 box create shell
run9 box exec shell -it /bin/sh
Inside that shell you can work normally:
# inside the shell:
pwd
uname -a
exit
The exec wakes the box. You do not start it separately.
Inside one shell session, cd, exported variables, and shell-local state behave the way you expect. When you exit, that shell state ends, but files you created in the box remain.
Keep stdin without TTY
Use -i when a command reads stdin but does not need a terminal UI, such as cat, tee, or another program that only consumes bytes:
run9 box exec shell -i /bin/cat
Another way into the same box
run9 box exec -it ... and product SSH both attach you to the same box model. The difference is mostly which client you want in your terminal:
run9 box exec -itfits well if you are already working in the run9 CLI.- Access via SSH fits well if a standard
sshcommand or an SSH config entry works better in your terminal.
For work that should keep running after this terminal closes, Long-running Task uses box exec-bg and an exec_id instead of one live shell session.
Exit cleanly
Exit the shell when done:
exit
After the box is idle, run9 can sleep it automatically. Most of the time you can simply exit and leave it there. Reach for run9 box stop shell only when you need the box quiet immediately.