Ubuntu - Windows - Run windows cmd from linux

To run windows cmd from linux box, there is one tool you could use, which is winexe. You can download the installer from here. There are 2 ways to install this tool:

1. Use the preinstalled version.

2. Compile from source.

To use it is very simple:

winexe -U foo -W WORKGROUP -n FOO-PC //10.0.0.61 "cmd.exe"

where:

Once connected, you will get command prompt like below:

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\WINDOWS\system32>

To quit, just type exit at the windows command prompt.