Friday, May 3, 2024
31
rated 0 times [  31] [ 0]  / answers: 1 / hits: 73335  / 2 Years ago, sat, october 22, 2022, 4:14:23

Is there a way to make a file that would run a terminal command when you click it? Similar to a .bat extension in windows?


More From » command-line

 Answers
4

Open your text editor, and type the following line: #! /bin/bash. Leave an empty line and start typing your commands. Save the file, the extension doesn't matter.

Go to the file in your file manager, right-click it, open the properties dialog, go to the permissions tab in the dialog, check the "Allow execution of this file", and click the close button. Now you can double-click the file and choose to run it in a terminal window.


[#40218] Sunday, October 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pheter

Total Points: 223
Total Questions: 111
Total Answers: 119

Location: Guadeloupe
Member since Sat, Aug 22, 2020
4 Years ago
pheter questions
Mon, Jun 21, 21, 07:35, 3 Years ago
Tue, Jul 5, 22, 22:50, 2 Years ago
Sat, Nov 27, 21, 17:50, 2 Years ago
;