In Step 2, we mentioned that we need to set up a few environment variables after installing Gurobi. We could add a few lines to ~/.bashrc file so that we don’t need to run the environment variable setup commands each time we open bash.
You could open the file with the nano editor using the following command:
sudo nano ~/.bashrc
and then add the following 4 lines to the end of the file:
export GUROBI_HOME="/mnt/c/Linux/gurobi902/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
export GRB_LICENSE_FILE="/mnt/c/Linux/gurobi902/gurobi.lic"
Please note the paths are where I installed Gurobi and where I saved the license for Gurobi. You might need to change it accordingly.
If you want to start writing your code now, please see this topic: C++ Gurobi programming for Beginners