How Do I Run a Batch File in Linux?

How Do I Run a Batch File in Linux?
Contents

Batch files can be run by typing “start FILENAME. bat”. Alternately, type “wine cmd” to run the Windows-Console in the Linux terminal. When in the native Linux shell, the batch files can be executed by typing “wine cmd.exe /c FILENAME.

How do I run a batch file in Terminal?

Executing Batch Files

  1. Step 1 − Open the command prompt (cmd.exe).
  2. Step 2 − Go to the location where the . bat or . cmd file is stored.
  3. Step 3 − Write the name of the file as shown in the following image and press the Enter button to execute the batch file.

How do I run a .bat file in Ubuntu?

The solution by OP

  1. Install Wine & configure it to relevant Windows version for game.
  2. Open Gedit (notepad of Ubuntu)>Edit>Preferences>Plugins>select ‘External tools execute external commands shell scripts’>Close.
  3. Go to your .bat file>right click>Properties>Permissions>select ‘allow executing file as program’>Close.
Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.