I have a script.sh file and type of this file is shellscript file. I want to make this file as application/x-executable file. How can I make it?
Command Line – How to Make a File Executable to Run from Terminal
command lineexecutable
command lineexecutable
I have a script.sh file and type of this file is shellscript file. I want to make this file as application/x-executable file. How can I make it?
Best Answer
You can mark the file as executable:
You can then execute it like this:
If you want to use a different command to start it, you can add an alias:
Add this at the end of the file:
Open a new terminal session or type
source ~/.bashrc
in your terminal to apply. Then simply use the new name to start the script.