E
E
Elmonzo2021-09-29 00:46:58
linux
Elmonzo, 2021-09-29 00:46:58

How to make a script on linux run through its name, without bash?

I run the script like this "bash /path to the script"
I want the script to run in one word

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-09-29
@Elmonzo

Place the script in a directory that is in the PATH (for example /usr/bin)
Give it permission to execute And specify the chmod +x <script_name>
shebang in the first line of the script . #!/bin/bash
./<script_name>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question