解决使用code命令时的bash: code: command not found问题
1) 找到下面的文件路径
$HOME/.vscode-server/bin/<directory with a hash-like name>/bin/remote-cli
其中<directory with a hash-like name>的值并不相同, 需要自己获取一下
2) 查看$HOME/.vscode-server/bin/<directory with a hash-like name>/bin/remote-cli中的remote-cli下有没有code可执行文件
3) 有的话在环境变量中导入该路径即可使用
export PATH=$HOME/.vscode-server/bin/<directory with a hash-like name>/bin/remote-cli:$PATH
示例
export PATH=$HOME/.vscode-server/bin/384ff7382de624fb94dbaf6da11977bba1ecd427/bin/remote-cli:$PATH
为了方便也可以在~/.bashrc文件中设置一下环境变量