- Create your bash script:
mkdir ~/bin/ gedit ~/bin/myscript chmod +x ~/bin/myscript
- Update PATH:
To do so, open a terminal and edit your ~/.bashrc (if there’s no .bashrc file just create a new one):gedit ~/.bashrc
Append the following two lines:
PATH=$PATH:~/bin export PATH
- Logout and login.
Now you should be able to run “myscript” just like the other commands
Ubuntu howto – add custom bash scripts to your path
Leave a Comment
You must be logged in to post a comment.