Windows 10: Cannot run linux command directly from cmd/powershell

Discus and support Cannot run linux command directly from cmd/powershell in Windows 10 BSOD Crashes and Debugging to solve the problem; Recently, I upgraded my windows to 2004 from 1909. I notice that I cannot run command like "xxx grep xx" from command line anymore. Initially I... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by lihanchen, Mar 9, 2020.

  1. lihanchen Win User

    Cannot run linux command directly from cmd/powershell


    Recently, I upgraded my windows to 2004 from 1909.

    I notice that I cannot run command like "xxx grep xx" from command line anymore.

    Initially I thought that is because I have WSL2 Ubuntu distro now, but converting Ubuntu to WSL1 didn't help the problem.


    On Win10 2004:

    Cannot run linux command directly from cmd/powershell ebff3b3b-5952-47fe-8f8f-b9e6a6d9c463?upload=true.png
    It says cannot recognize grep as cmdlet, function, script, or executable...



    On another computer of Win10 1809:

    Cannot run linux command directly from cmd/powershell 37637972-2223-43bb-929e-25f8a7dfc213?upload=true.jpg



    Is there a way I can run linux command directly from cmd/powershell on Win10 2004? I find grep and some other tool very convenient.

    :)
     
    lihanchen, Mar 9, 2020
    #1
  2. tcebob Win User

    Can't run command in PowerShell but OK in Cmd


    I tried the suggested command and it does work manually in Power Shell. But Task Scheduler chokes on it.


    Cannot run linux command directly from cmd/powershell [​IMG]


    If i say "Yes" it breaks up the command string to "%C:\program" with the rest of the command as an argument.
     
    tcebob, Mar 9, 2020
    #2
  3. dalchina Win User
    dalchina, Mar 9, 2020
    #3
  4. Cannot run linux command directly from cmd/powershell

    Linux command in Windows PowerShell

    When did Windows incorporate Linux command in PowerShell?
     
    Ng Kian Keong, Mar 9, 2020
    #4
Thema:

Cannot run linux command directly from cmd/powershell

Loading...
  1. Cannot run linux command directly from cmd/powershell - Similar Threads - Cannot run linux

  2. CMD command doesn't work on PowerShell

    in Windows 10 Gaming
    CMD command doesn't work on PowerShell: I'm trying to call 'cmd' inside Windows PowerShell console in order to get to work immediately with Command Prompt mode, but I got this message instead:I know I can use Command Prompt outside of PowerShell, but this is a special case.Any suggestions about how can I revert...
  3. CMD command doesn't work on PowerShell

    in Windows 10 Software and Apps
    CMD command doesn't work on PowerShell: I'm trying to call 'cmd' inside Windows PowerShell console in order to get to work immediately with Command Prompt mode, but I got this message instead:I know I can use Command Prompt outside of PowerShell, but this is a special case.Any suggestions about how can I revert...
  4. CMD command doesn't work on PowerShell

    in Windows 10 Customization
    CMD command doesn't work on PowerShell: I'm trying to call 'cmd' inside Windows PowerShell console in order to get to work immediately with Command Prompt mode, but I got this message instead:I know I can use Command Prompt outside of PowerShell, but this is a special case.Any suggestions about how can I revert...
  5. Can't run almost any commands in cmd/powershell

    in Windows 10 Gaming
    Can't run almost any commands in cmd/powershell: Basically, adb : The term 'adb' 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 + adb + ~~~ + CategoryInfo :...
  6. Can't run almost any commands in cmd/powershell

    in Windows 10 Software and Apps
    Can't run almost any commands in cmd/powershell: Basically, adb : The term 'adb' 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 + adb + ~~~ + CategoryInfo :...
  7. Open Cmd via PowerShell, command?

    in Windows 10 BSOD Crashes and Debugging
    Open Cmd via PowerShell, command?: Please i need to open cmd win + r and so i know i need to know how to open it via powershell pls (.bat and so i know it needs to be opened via powershell. Pls PowerShell command to open cmd? Cmd über PowerShell öffnen, Befehl?
  8. Powershell with CMD/c to run external command with Parameters

    in Windows 10 Customization
    Powershell with CMD/c to run external command with Parameters: Greeting, I have an old command line application call Commandline.exe. it run with a parameter to check then show the result. but it need extra "Enter" to confirm like: commandline.exe -s 4567890 So I preparing the an answer file which is on an "Enter" crlf...
  9. Linux command in Windows PowerShell

    in Windows 10 Customization
    Linux command in Windows PowerShell: When did Windows incorporate Linux command in PowerShell? https://answers.microsoft.com/en-us/windows/forum/all/linux-command-in-windows-powershell/a5a16d50-78a3-4d90-9965-d60d3b550231
  10. Can't run command in PowerShell but OK in Cmd

    in Windows 10 Support
    Can't run command in PowerShell but OK in Cmd: [img] [img] The screen shots show results of running Code: "C:\Program Files\AVAST Software\Avast\ashCmd.exe" /@=Quick[/quote] in both PS and Cmd. The problem is I have made a task in Task Scheduler to run this command daily and, apparently, Task Scheduler insists on...