Contents
You should put your script under $HOME/bin .
Where do I write shell script in Ubuntu?
Ubuntu – Scripting
- Step 1 − Open the editor. …
- Step 2 − Enter the following text in the editor. …
- Step 3 − Save the file as write-ip.sh. …
- Step 4 − Go to the command prompt, navigate to the Desktop location and issue the following command. …
- Step 5 − Now, we can execute the file by issuing the following command.
Where do I put shell scripts?
Where you put your script depends on who the intended user is. If it is just you, put it in ~/bin and make sure ~/bin is in your PATH . If any user on the system should be able to run the script, put it in /usr/local/bin . Don’t put scripts you write yourself in /bin or /usr/bin .