search

Home  >  Q&A  >  body text

gitbash - 在windows下为什么装了git bash这个工具后就能执行linux命令了呢?

明明是在windows系统下,我在cmd中执行 cd 等命令会提示命令语法不正确,但是装了git bash这个工具后就能执行linux的命令了,但是我想查看当前的进行,在纯linux里面执行ps aux|grep tomcat 来查看目前是否有tomcat这个进程就好用,但是在windows的git bash里面就不行了。。。这是为什么呢?

PHPzPHPz2837 days ago834

reply all(2)I'll reply

  • 迷茫

    迷茫2017-04-17 14:32:19

    Windows commands use the path environment variable to find the corresponding exe file. When installing git bash, some executable files are added to the path variable (such as the git command), which can be done through cmd Executed.

    The

    cd command is available by default under Windows. You may accidentally change path and add C:Windowssystem32; and it will work.

    The command sets of windows and linux are different. Windows mainly focuses on graphical interface, and there are many fewer command line tools than linux.

    Reference https://en.wikipedia.org/wiki/PATH_(variable)

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 14:32:19

    git bash is just a simulated unix environment using cygwin

    reply
    0
  • Cancelreply