OpenShift Keyboard Shortcuts

Complete OpenShift keyboard shortcuts and commands reference — 16 shortcuts across 2 categories. Quick reference cheat sheet for Windows & Mac.

oc is OpenShift's command-line client, a superset of kubectl: every kubectl command works, and oc adds the project, build and route concepts that OpenShift layers on Kubernetes. The table covers the commands a developer runs in a day; the notes explain which ones are OpenShift-specific and what they map to underneath.

oc CLI Basics (8)

ShortcutAction
oc login <url>Login
oc project <name>Switch project
oc new-project <name>Create project
oc get podsList pods
oc get allGet all resources
oc describe pod <name>Describe pod
oc logs <pod>View logs
oc rsh <pod>Remote shell

Deployments & Builds (8)

ShortcutAction
oc new-app <image>New app
oc new-app --from-git <url>App from Git
oc start-build <buildconfig>Start build
oc rollout status dc/<name>Rollout status
oc rollout latest dc/<name>Trigger deploy
oc rollout undo dc/<name>Rollback
oc scale dc/<name> --replicas=3Scale
oc expose svc/<name>Expose route
📜 Source: Red Hat OpenShift documentation — OpenShift CLI (oc). Commands from the OpenShift CLI developer command reference for the current release. Checked 2026-09-05. How we verify ›
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Frequently Asked Questions

What are the most useful OpenShift keyboard shortcuts?

The most essential OpenShift shortcuts are: oc login <url> (Login), oc project <name> (Switch project), oc new-project <name> (Create project).

What is the OpenShift shortcut for login?

The OpenShift shortcut for login is oc login <url>.

Can I combine OpenShift shortcuts with other tools?

Yes — use My Stack to combine OpenShift shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.

Related Shortcut Pages

Docker npm / yarn AWS CLI PowerShell tmux GNU Screen

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

Logging in and choosing a project

oc login <url> authenticates against the cluster API — the console's "Copy login command" produces the exact line with a token — and oc project <name> switches the current project, which is a Kubernetes namespace with extra RBAC and quota attached. oc new-project <name> creates one. From there oc get pods, oc get all, oc describe pod <name> and oc logs <pod> behave exactly as their kubectl equivalents, and oc rsh <pod> opens a shell in a container without needing to know the exec syntax.

Building and deploying

oc new-app <image> creates a deployment, service and image stream from a container image in one step, and oc new-app --from-git <url> does the same from source, detecting the language and building with a source-to-image builder. oc start-build <buildconfig> triggers a rebuild. oc rollout status dc/<name> waits for a rollout to finish, oc rollout latest dc/<name> forces a new one and oc rollout undo dc/<name> rolls back. Note the dc/ prefix: those rows target DeploymentConfigs, the older OpenShift object; newer projects use standard Deployments and the same commands with deployment/.

Exposing and scaling

oc expose svc/<name> creates a Route, OpenShift's built-in ingress, and prints a hostname on the cluster's domain — the step that makes an app reachable without writing an Ingress resource. oc scale dc/<name> --replicas=3 changes replica count directly. For anything the table does not cover, oc explain and oc get -o yaml show the objects, and oc adm holds the administrator commands.

🤖 Ask AI about OpenShift shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok