First time here? Check out the Help page!
1 | initial version |
That's more of a Unix question than a specific OpenStudio one. But anyways, when you type openstudio
(or any program without a full path), it will look for this executable, in order of preference
which openstudio
will tell you where it found it. It's likely going to be at /usr/local/bin/openstudio
and that is a symbolic link (or symlink). ls -la $(which openstudio)
will tell you where it points to. Here are the result of the commands on my Ubuntu machine
$ openstudio --version
3.1.0+e16509062
$ which openstudio
/usr/local/bin/openstudio
$ ls -la $(which openstudio)
lrwxrwxrwx 1 root root 53 juin 1 08:55 /usr/local/bin/openstudio -> /usr/local/openstudio-3.1.0/bin/openstudio
If you want to temporarily use another version, then specify the full path to the openstudio CLI. On mac it's going to be something like /Applications/openstudio-3.2.0/bin/openstudio
$ /usr/local/openstudio-3.1.0/bin/openstudio --version
3.1.0+e165090621
$ /usr/local/openstudio-3.2.0/bin/openstudio --version
3.2.0+e11f0a08b2
If you want to permanently change it, you just need to redo the symlink via sudo ln -sf <path/to/installed/openstudio> <destination>
$ sudo ln -sf /usr/local/openstudio-3.2.0/bin/openstudio /usr/local/bin/openstudio
$ ls -la $(which openstudio)
lrwxrwxrwx 1 root root 42 juil. 5 21:50 /usr/local/bin/openstudio -> /usr/local/openstudio-3.2.0/bin/openstudio
$ openstudio --version
3.2.0+e11f0a08b2