1oc shell sb-abc123
Ctrl+D or type exit to disconnect.1oc shell sb-abc123 --shell /bin/zsh
/bin/bash.tmux and less work correctly.| Use Case | Command |
| Run a single command, capture output | oc exec --wait |
| Scripting and automation | oc exec --wait --json |
| Interactive development | oc shell |
| Debugging | oc shell |
1oc shell $(oc create --json | jq -r '.sandboxID')
123ID=$(oc create --json | jq -r '.sandboxID') oc exec $ID --wait -- bash -c 'echo "export PATH=/app/bin:\$PATH" >> ~/.bashrc' oc shell $ID