Created
December 22, 2014 20:16
-
-
Save shaik2many/47cb4b16323b926a4be5 to your computer and use it in GitHub Desktop.
linux setting shell path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step1: $vi /home/user1/scripts/my_script.sh | |
#!/bin/bash | |
# My first script | |
echo "Hello World!" | |
**Setting permissions** | |
Step2: $chmod 755 my_script (The "755" will give you read, write, and execute permission. | |
Everybody else will get only read and execute permission. If you want your script to be private (i.e., only you can read and execute), use "700" instead.) | |
**Putting it in your path** | |
Step3: | |
$ echo $PATH | |
$ export PATH=$PATH:/home/user1/scripts | |
**Executing the Command** | |
$my_script | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment