Skip to content

System Path

The system PATH is an environment variable that tells the operating system where to find executable files. Adding directories to the PATH allows you to run commands from the terminal without specifying their full location.

Windows system path

To add a new directory to the system path on Windows:

  1. Open the Environment Variables screen as described in the Environment Variables section.
  2. Under System variables, select the Path variable and click the Edit button. Environment Variables window
  3. In the new window, click New, add the directory path you want to include, and click OK to save. New directory

MacOS system path

To add a new directory to the system path on macOS:

  1. Open your shell configuration file (e.g., ~/.zshrc) as described in the Environment Variables section.
  2. To add a new directory to the PATH environment variable, append a line like this:
    shell
    export PATH="$PATH:/path/to/your/directory"
    For example:
    shell
    export PATH="$PATH:/Users/mauro/Library/Android/sdk/cmdline-tools/latest/bin"
  3. Save the file and restart your terminal session to apply the changes.