linux - How can I change the binary file link to something else -
i have 2 questions , linked. execute command this:
python
on shell , opens shell.
now want
to file linked. mean when run
python
path of file opens/usr/bin/python
or what?the other questions want change link other location when run
python
opens/usr/bal/bla/python2.7
.
the command run when type python
determined setting of $path
. first executable file called python
found in directory listed on $path
1 executed. there no 'link' per se. which
command tell shell executes when type python
.
if want python
open different program, there number of ways it. if have $home/bin
on $path
ahead of /usr/bin
, can create symlink:
ln -s /usr/bal/bla/python2.7 $home/bin/python
this executed instead of /usr/bin/python
. alternatively, can create alias:
alias python=/usr/bal/bla/python2.7
alternatively again, if /usr/bal/bla
contains other useful programs, add /usr/bal/bla
$path
ahead of /usr/bin
.
there other mechanisms too, 1 of these 1 use. i'd use symlink in $home/bin
.
Comments
Post a Comment