OCI Utilities

Instances created using platform images based on Oracle Linux include a pre-installed set of utilities that are designed to make it easier to work with Oracle Linux images. These utilities consist of a service component and related command line tools that can help with managing block volumes (attach, remove, and automatic discovery), secondary VNIC configuration, discovering the public IP address of an instance, and retrieving instance metadata.

The following table summarizes the components that are included in the OCI utilities.

Name Description
ocid The service component of oci-utils, which runs as a daemon started by systemd. This service scans for changes in the iSCSI and VNIC device configurations and caches the OCI metadata and public IP address of the instance.
oci-growfs Expands the root filesystem of the instance to its configured size.
oci-iscsi-config Lists or configures iSCSI devices attached to a compute instance. If no command line options are specified, lists devices that need attention.
oci-metadata Displays metadata for the compute instance. If no command line options are specified, lists all available metadata. Metadata includes the instance OCID, display name, compartment, shape, region, availability domain, creation date, state, image, and any custom metadata that you provide, such as an SSH public key.
oci-network-config Lists or configures virtual network interface cards (VNICs) attached to the compute instance. When a secondary VNIC is provisioned in the cloud, it must be explicitly configured on the instance using this script or similar commands.
oci-network-inspector Displays a detailed report for a given compartment or network.
oci-notify Sends a message to a Notifications service topic.
oci-public-ip Displays the public IP address of the current system in either human-readable or JSON format.

Installing the OCI Utilities

The OCI utilities (oci-utils) are automatically included with instances launched with Oracle Linux 7 and later images. They are not currently available on other distributions.

Much of the OCI utilities functionality requires that you have the Oracle Cloud Infrastructure SDK for Python installed and configured.


  • Beginning with oci-utils package version 0.11, the OCI utilities can no longer be used with Python 2 in favor of Python 3.
  • Beginning with oci-utils package version 0.12.6, the OCI utilities no longer require the installation of the python36-oci-cli package.

To install the Oracle Cloud Infrastructure SDK using yum, install the required packages corresponding to the image used by the instance.

Oracle Linux 7
sudo yum install -y python36-oci-sdk
Oracle Linux 8
sudo dnf config-manager --enable ol8_oci_included
sudo dnf config-manager --enable ol8_developer
sudo dnf install -y python36-oci-sdk 

For configuration information, see the Oracle Cloud Infrastructure SDK for Python documentation.

For a training video that demonstrates how to install and set up the OCI utilities, see Enabling OCI Utilities in Oracle Linux on Oracle Cloud Infrastructure Instances in the Oracle Learning Library.

Updating the OCI Utilities

To update to the latest version of oci-utils:

sudo yum update oci-utils

Using the OCI Utilities

To use the OCI utilities, you first need to start the ocid service. This example starts the ocid daemon using systemd and sets the ocid service to start automatically during system boot.

sudo systemctl enable --now ocid.service