Page
Download and install oc
This lesson walks you through downloading and installing Red Hat OpenShift oc
CLI.
Prerequisites:
- A terminal session on your computer.
In this lesson, you will:
- Download and install the
oc
CLI.
The first step is to open the OpenShift dashboard and locate the help (question mark) icon in the upper right corner (Figure 1).
Click on the question mark to display the dropdown menu; then click the Command Line Tools option (Figure 2).
The Command Line Tools page will appear, from which you can download the proper executable for your operating system. See Figure 3.
Finally, download the appropriate compressed file, extract the oc
executable, and put it in a directory that is in your system’s path. For Mac and Linux, this is typically /usr/local/bin.
For Windows, it’s %ProgramFiles%.
Wrapping up
By following the steps outlined in this lesson, you will have finished with the oc
command available at the command line on your computer. This command is used to log into an OpenShift cluster (oc login
) and to perform useful command line operations.
If you’re interested in learning more, consult these resources: