To add a directory to the PYTHONPATH variable, you can use the following command in the terminal:
export PYTHONPATH=$PYTHONPATH:/path/to/directory
Replace /path/to/directory with the path to the directory you want to add to the Python path. You can also add multiple directories by separating them with a colon (:).