In Windows CMD I can write some DOS commands in a text file, with *.bat extension, then just calling the file name will execute the commands.
cd c:\myapp
dir
Saving the above file, for example, m.bat will make it executable by entering m in the command prompt.
In Linux I tried to wrap the command service network-manager restart in a .sh file named rn.sh after changing its mode chmod +x rn.sh to be executable I always have to enter ./rn.sh to run it.
However, I just need to enter rn to run it. In other words, I need that rn.sh file works like a program or an application. How could I do that?