首页 > 解决方案 > Powershell 找不到 sysctl

问题描述

在 powershell 中运行sysctl会出现以下错误:

sysctl : The term 'sysctl' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ sysctl
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (sysctl:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

它曾经工作正常,但在我手动删除一些与 python 相关的文件夹后停止工作。可能我已经删除了其他东西,但现在我想让它在不重新安装 Windows 的情况下工作。

我试过的:

有趣的是,我sysctl -w vm.max_map_count=262144从 WLS 运行 - 它给了我permission denied on key "vm.max_map_count"

任何想法表示赞赏!

标签: powershellsysctl

解决方案


推荐阅读