This question already has an answer here:
- Why doesn't my alias work over ssh? 1 answer
so I have a alias for hadoop which I defined in bash_aliases which bashrc touches upon I guess.
Now the alias works fine when I directly try to run it. But when I try this
ssh aditya@localhost hadoop
I get the following error message
bash: hadoop: command not found
I tried the following too
shopt -s expand_aliases
But that didn't work. Could anyone help me out.
This question is different from mine, because the ssh command is not generated by me, so the solution to that question does not solve my question. The ssh command is generated and executed by a script inside a library I am using. I do not prefer to modify that script to change the command as I am not completely aware of how that script works.