When I try to use WMIC in Windows Bash, it says command not found. Though, in git-bash and Cygwin I am able to use WMIC, so how can I achieve this in Windows Bash?

  • 1
    You cannot. The environment is separate, it literally is an Ubuntu installation, Cygwin and git-bash are not. – Ramhound Aug 6 '16 at 13:00
  • @ramhound is there something similar to wmic for Ubuntu? Or how could I get lua working with Cygwin or Git-Bash? As the two say Lua: command not found, but cmd works fine with lua. But I need Git-bash or Cygwin for the character escaping. I'm trying to run cmdfetch by hal ullr on github. – ErraticFox Aug 6 '16 at 13:05
  • The proper tag for this is windows-linux-subsystem. Other SO sites use also tag "wsl". – ddbug Nov 21 '16 at 10:01
  • Maybe consider asking a question that matches your particular use case? As WMIC stands for "Windows Management Instrumentation Command-line" it's unlikely there is a direct translation but there probably is some kind of option available. It would depend on what your goal is. To get Lua working you could just install it on Windows instead of the subsystem. The github page for that script has information on how to do that. – Seth Nov 21 '16 at 12:35

Try wmic.exe the .exe is important.


In a recent WSL update, it become possible to run Windows commands from within the "bash box". For details, see: Invoking Windows binaries from WSL

Note that this ability can be turned off via a magic /proc/sys file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.