We help IT Professionals succeed at work.

Trying to run .bat file in windows machine from an ubuntu desktop

Last Modified: 2013-11-15
Hi, I'm a newbie in Linux, I just installed Ubuntu 7.04 and I'd like to run a .bat file located in a Windows 2000 server machine like you'd do with any OS from Microsoft. All I get when I double click on it is the ubuntu text editor.

How can I do that ? do I have to create a .sh file ????

Thanks in advance!
Watch Question

Hmm, well linux and dos have alot of differeneces so you may want to write a bash script or perl (whatever you are more comfortbale using).

Here's a good translation page if your a hardcore DOS fan http://www.tldp.org/LDP/abs/html/dosbatch.html

a bash script is normally named .bsh

#vi helloworld.bsh

'a for edit
echo hello world
'save and exit wq

#chmod 777 helloworld.bsh



Ok... thanks.... after I'll have 'translated' it, where do I put it ? in Ubuntu or in Win2000 machine ?
This one is on us!
(Get your first solution completely free - no credit card required)
Well in theory you can store it anywhere, you just need to run it from a unbuntu booted machine.

What are you trying to do?

> .. you just need to run it from a unbuntu booted machine
ignoring the word "booted" I assume that you meant that the ssh/rsh command needs to be run on that machine, not the script itself
This one is on us!
(Get your first solution completely free - no credit card required)

You can try installing wine..Using wine you can run windows exe and bat file by just double clicking

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.