Frequent Question: How Do I Run a File in Ubuntu Terminal?
Contents

How do I run a file in Ubuntu?

To execute a RUN file on Linux:

  1. Open the Ubuntu terminal and move to the folder in which you’ve saved your RUN file.
  2. Use the command chmod +x yourfilename. run to make your RUN file executable.
  3. Use the command ./yourfilename. run to execute your RUN file.

How do I run a file in Terminal?

Steps to write and execute a script

  1. Open the terminal. Go to the directory where you want to create your script.
  2. Create a file with . sh extension.
  3. Write the script in the file using an editor.
  4. Make the script executable with command chmod +x <fileName>.
  5. Run the script using ./<fileName>.
Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest