
UBUNTU – CREATE YOUR OWN SHELL SCRIPT EXECUTABLE AS A COMMAND
If you create a shell script, and you don’t want to run it with the whole url such as /full/path/to/your/file.sh you can do the following:
- Create a symlink to the corresponding script in folder /usr/local/bin
12345# Create the corresponding symlinksudo ln -s /full/path/to/your/file.sh /usr/local/bin/name_of_new_command# After that you should make your file executable:chmod +x /full/path/to/your/file.sh - Now you should be able to run name_of_new_command at any time in your terminal.