How to add alternative to program that located in /usr/bin

276 Views Asked by At

Is it possible to substitute binary with same name alternative? I have /usr/bin/qtcreator

I want to use alternative version but /usr/bin/qtcreator is binary but not alternative.

What the way I should do this?

2

There are 2 best solutions below

0
Pelle On

You could place your new qtcreator at /usr/local/bin/qtcreator, that location should have preference over /usr/bin.

You can check the possible locations for binaries and the order is which they are searched with echo $PATH and you can check which binary will be called with which qtcreator

3
James Brown On

In Bash:

$ alias qtcreator="/usr/local/bin/qtcreator"

or make sure the path to desired binary is mentioned before the undesired path in $PATH (... as mentioned by others).