https://learninghub.kx.com/forums/topic/q-namespace-clash-with-amazon-q
How to change it as q launches Amazon Q CLI
https://learninghub.kx.com/forums/topic/q-namespace-clash-with-amazon-q
How to change it as q launches Amazon Q CLI
Here is an example where I have 2 executables
$ which -a q
/home/rocuinneagain/.local/bin/q
/home/rocuinneagain/q/l64/q
The order in which they are returned is controlled by $PATH
$ echo $PATH
/home/rocuinneagain/.local/bin:...:/home/rocuinneagain/q/l64
You can start kdb+ q by using it's full path:
$ /home/rocuinneagain/q/l64/q
KDB+ 4.1 2025.02.18 Copyright (C) 1993-2025 Kx Systems
...
q)
You could also make an alias:
$ alias mykx='/home/rocuinneagain/q/l64/q'
KDB+ 4.1 2025.02.18 Copyright (C) 1993-2025 Kx Systems
...
q)
Alias is popular to use so you can include rlwrap
in the startup commend so you can use keyboard arrows etc.
$ alias rlq='rlwrap /home/rocuinneagain/q/l64/q'
KDB+ 4.1 2025.02.18 Copyright (C) 1993-2025 Kx Systems
...
q)
Or use a symlink:
$ ln -s /home/rocuinneagain/q/l64/q /home/rocuinneagain/q/l64/kxq
$ kxq
KDB+ 4.1 2025.02.18 Copyright (C) 1993-2025 Kx Systems
...
q)
Or you could add the kdb q location to the start of PATH ahead of the conflicting package (then to call the other package you would need to use fullpath/alias/symlink as above)
export PATH="/home/rocuinneagain/q/l64/:$PATH"
$ q
KDB+ 4.1 2025.02.18 Copyright (C) 1993-2025 Kx Systems
...
q)