我正在使用ProcessStartInfo执行来自.net的linux shell脚本(".sh“文件)。在Windows环境中,我可以将脚本内容复制到文本文件中,但对于Linux,这是不起作用的。//File.CreateText(txtFileName);
if (RuntimeInformation.IsOSPlatform(OSPlatform.LinuxstartInfo = new ProcessStar
它将数据保存在一个文本文件中,我希望它在程序结束时打开该文件。Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo
但是在Linux上是不可能的。Powershell将返回以下错误:实际上,根据Start-Process: The parameter '-Verb' is not supported for the cmdlet 'Start-Process,根据,“-Verb参数不适用于非Windows系统”,因此在Linux上不可能以管理方式运行Powershell。
我的问题很简单:如何在Linux上提升Powershell的权限?如何在Linux