3

I'm using the Windows Subsystem for Linux WSL. I can start and exit the Ubuntu command-line with ubuntu or exit respectively, but I also want to run cmd commands there.

How can I start cmd.exe from within the WSL terminal?

dessert
  • 39,982
  • I use my ubuntu command line for nearly all things, sometimes i need to run a windows command in the directory where i am working, i would like to switch to the windows console for a moment instead of starting a new and seperate windows terminal. But an explenation of how to use windows cmd.exe commands within ubuntu would be usefull too – Mister Verleg Dec 05 '17 at 09:26
  • 2
    @dessert This answer is not a duplicate of that question. The question that you linked to is about how to start a Windows executable in Ubuntu. This question however is about how to start a Windows executable in Windows Subsystem for Linux (WSL) ( https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux ). – karel Dec 05 '17 at 10:52
  • 1
    Questions relating to Windows Subsystem for Linux, the compatibility layer developed by Canonical and Microsoft to run Ubuntu programs natively in newer versions of Windows, are on topic at Ask Ubuntu. wsl tag at Ask Ubuntu. – karel Dec 05 '17 at 11:18
  • 2
    @dessert Edited the question and added the wsl tag. I hope this edit will be sufficient to scare off predatory downvoters and reviewers. – karel Dec 05 '17 at 11:21

1 Answers1

5

From within a Bash/WSL console you can invoke Windows executables by specifying the (correctly-cased) name of the executable, including its .exe extension (example: notepad.exe [filename]). To start a new cmd shell and (optionally) run a command/executable program type:

cmd.exe  
karel
  • 114,770