ssh - How to fix path references is ssh?
问题描述
I'm having problems with ssh not referencing the /usr/local/bin directory. I know that a manual export PATH="$PATH:/usr/bin"
from remote works, however I was hoping to find a way to do it without manually executing the command every time.
echo $PATH
output from remote:
$PATH:$JAVA_HOME/bin:/usr/lib/jvm/jdk-16.0.1/bin
echo $JAVA_HOME
output from remote:
/usr/lib/jvm/jdk-16.0.1
-- this is right
The problem seems to be with the $PATH and $JAVA_HOME references not working. Not sure how to fix. Thanks for your help.
Edit: Someone told me that I should also include some information about both PCs, so here it is. Both are windows running debian WSL. Both have zsh installed and the .zshrc has a line that sources /etc/environment, which sets the JAVA_HOME and PATH env vars. the output of the two env echos are what the environment variables are set to in the /etc/environment.
Note: I'm a bit new here so if anyone wants some extra information just comment and I'll try to get it.
解决方案
推荐阅读
- haskell - 两个列表元素的所有非重复组合
- android - Android 如何在 Spinner 中更改滚动条颜色
- c# - 正在更改 SessionId 导致此错误“视图状态验证失败。原因:视图状态提供的完整性检查失败。”
- android - Activity.setTheme() 之后的 Activity.recreate() 导致活动泄漏
- unique - 根据第二列计算列中的不同值
- xcode - 目标的构建设置中没有“金属编译器”
- generics - Kotlin 中的协议实现可识别的推断类型
- xcode - 在某些设备上查看效果不佳
- coq - 当 Coq 扩展一个函数作为目标的一部分时,这意味着什么?
- couchdb - CouchDB 2.x 下 local_seq 的行为是什么?