如何在Atom-IDE嵌入式终端

时间:2018-05-09 02:11:23

标签: cmd atom-editor

我正在使用atom进行Nodejs-MongoDB开发,

启动MongoDB服务器我需要将cmd作为Run as administrator启动, 然后只有服务器启动。

但是当我在IDE中使用原子默认终端时,它以用户身份打开,无法以管理员身份运行,不像我们在linux中使用susudo

当我在atoms-terminal中尝试net start MongoDB命令时,它说权限被拒绝了。 那么如何通过原子终端以管理员身份运行它?

screenshot of screen

2 个答案:

答案 0 :(得分:0)

默认情况下以管理员身份打开cmd或powershell:

  1. 转到Start
  2. 搜索PowerShell
  3. 右键点击PowerShell
  4. 选择Open file location
  5. 转到Properties>> Shortcuts>> Advance
  6. 检查Run as administrator选项
  7. Apply>> Ok
  8. 现在转到Start
  9. 搜索atom
  10. 选择open as administrator,您将通过嵌入式终端以管理员身份运行命令。

答案 1 :(得分:0)

如果您的atomide使用powershell终端,则可以从开始菜单以管理员身份打开powershell,然后输入以下命令: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force