+-
linux – 使用SSH运行swapon时找不到命令
我正在尝试远程使用“swapon -s”但是“找不到命令”

$ssh ns2 swapon -s 
bash: swapon: command not found

在本地使用它是完美的,这可能是什么原因?

最佳答案
有几个可能的原因:

>你不是偏远的根.检查一下我是谁或身份证.要确保你是root用户,请使用ssh root @ ns2 …
>你的道路是错的.这通常是sudo的问题.试试ssh ns2 sudo / sbin / swapon

点击查看更多相关文章

转载注明原文:linux – 使用SSH运行swapon时找不到命令 - 乐贴网