Developer Guide

  • 2021.3
  • 06/30/2021
  • Public Content

Set the Environment Variables and Launch the Visual Studio Code

Perform these steps to set the environment variables:
  1. Open a terminal session.
  2. Locate the
    setvars.sh
    script. The location depends of your oneAPI installation, and it will be one of the following:
    • If you installed as
      root
      or
      sudo
      , then find the script in the root directory of your oneAPI installation, which is typically
      /opt/intel/inteloneapi/
      .
    • If you did not install as
      sudo
      or
      root
      , then find the script in the
      ~/intel/inteloneapi/
      directory.
    • If you customized the installation folder, then find the script in your custom installation folder.
  3. Run the
    setvars.sh
    script from the command line using the following command:
    source <oneapi_install_path>/setvars.sh
    For more information, refer to Set Environment Variables for CLI Development.
  4. In the same terminal session, launch VS Code by running the following command:
    code
    The benefit of sourcing the oneAPI
    setvars.sh
    script before launching VS Code is that all terminal sessions and child processes of VS Code will include the oneAPI development environment setup.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.