Hello,
as we know the bash shell executes a files only if they are stored in one of the directories included in the bash PATH. in many bash tutorials it is sad that the user must create a new "bin" subdirectory in his home directory, where he will add his new bash scripts.
what will happen if the user stores his personal bash scripts in the /usr/local/sbin directory? is there some kind of danger for the os or for some parts of it, if I do so?
thanks in advance
where to add your personal bash script files [ SOLVED ]
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
where to add your personal bash script files [ SOLVED ]
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 20
- Posts: 12341
- Joined: Sun Aug 09, 2015 10:00 am
Re: where to add your personal bash script files
The path to search can be found as follows:-
In my case it is as follows.
As a convention it is best to put in bin folder under home directory. You can choose /usr/local/sbin too.
In my case it is as follows.
Code: Select all
echo $PATH
/home/uma/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak
Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
Regards,
Deepak
Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb