Get Started

  • 2022.2
  • 04/11/2022
  • Public Content

Configure Your CPU System

Intel® oneAPI Base Toolkit
Intel® oneAPI HPC Toolkit

Set Environment Variables for CLI Development

For working at a Command Line Interface (CLI), the tools in the oneAPI toolkits are configured via environment variables. Set up your CLI environment by
Option 1: Source once per session
every time you open a new terminal window:
You can find the
script in the root folder of your oneAPI installation, which is typically
for system wide installation and
when installed as a private installation. Note that system wide installation requires root or sudo privileges.
For system wide installations:
. /opt/intel/oneapi/
For private installations:
. ~/intel/oneapi/
Option 2: One time setup for
Environment variables can be set up to automatically set using one of the methods below:
To have the environment automatically set up for your projects, include the command
source <install_dir>/
in a startup script where it will be invoked automatically (replace
with the path to your oneAPI install location). The default installation locations are
for system wide installations and
for private installations.
For example, you can add the
source <install_dir>/
command to your
file. To make the settings permanent for all accounts on your system, create a one-line
script in your system's
folder that sources
(for more details, see Ubuntu documentation on Environment Variables).
The script can be managed using a configuration file, which is especially helpful if you need to initialize specific versions of libraries or the compiler, rather than defaulting to the "latest" version. For more details, see . oneAPI Development Environment Setup for more configuration options.

Extensions for Visual Studio Code Users

To watch a video presentation of how to install extensions and use them to set up your environment, explore sample code, and connect to the Intel DevCloud using Visual Studio Code, see oneAPI Visual Studio Code Extensions.
You can use VS Code extensions to set your environment, create launch configurations, and browse and download samples:
  1. From Visual Studio Code, click on the Extensions logo in the left navigation.
  2. Locate the extension titled
    Sample Browser for Intel oneAPI Toolkits
    , or visit to browse available extensions.
  3. Click
  4. Next, locate the extension titled
    Environment Configurator for Intel oneAPI Toolkits
  5. Click
For more information about VS Code extensions for Intel oneAPI Toolkits, see Using Visual Studio Code* to Develop Intel® oneAPI Applications.

Next Step

Run a sample project using one of these methods:

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at