How to Create New Shellscripts

Last Updated on April 18, 2021 by admin

This guide explains how you can create new shellscripts to execute in a terminal (I am using Linux Mint 11). Your scripts are usually stored in /bin and /usr/bin, however the sh file which we are going to use is located in /bin, so we are going to create the script there. Open a terminal and become root with


Now create a new text document in /bin and make it writable and executable:

touch /bin/newscript

chmod 777 /bin/newscript

Open the newly created file with a text editor and write the following code in the first line of the file:


Save the file now. Through this line it has become a script executed with the default shell, although it has no content yet. However you can either write your own script into it using Shell Script or use it to combine scripts you execute together a lot to save time.

Leave a Comment