Bash Configuration Gist
Bash Configuration
I updated my bash configuration gist today. As it has been a while since I have done as much and there have been some significant changes in my configuration model since the last update.
This gist is for the intermediate user and not so much a beginners guide. I do not go into a lot of explanations about CLI basics. It is likely to not make any sense at all to someone that is not versed in the basic concepts of the CLI using bash as a shell.
Bash Configuration Gist
Unus Nemo
#.bashrc #.bash profile #bash configuration #Gnu/Linux #Linux #bash
plan-A
— (Proud Eskimo!)@Unus Nemo
Thanks.
Mine came packed with latest it seem. NOT
bash --version
GNU bash, version 5.2.37(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.not available for me yet..
sudo dnf copr enable c3d/bash
Did you compiled your version of Bash? Is only way with pgp keys ok.
You laid it out, I know
" This works because by default, /usr/local/bin is before /usr/bin on the system path. This is by design. So that local installs by your admin (which is probably you) will override system defaults" which I'm not so found about.
Yes as I said bash 5.2.37 is the default for Fedora. You would have to be on Rawhide Fedora to get Release Candidates (RC) which I do not recommend. Yes, I compiled my bash straight from source from the GNU GIT Server. They sign everything and it is up to you to check the signature or not. Personally I use their savannah git service to get the source from the current maintainers. Though you can download the zip file with sig file if you prefer. We both know I am not nearly as paranoid as you are so I have no issues using their git server. Please note though that any version of bash on github is not the official version. It is just a version someone is playing with. Most GNU projects today use Savannah GNU git, which belongs to GNU.
plan-A likes this.
plan-A
— (Proud Eskimo!)I see now, thanks!
With search engine I had erronous ones..
This one it is.
savannah.gnu.org/git/?group=ba…
The GNU Bourne-Again SHell - Git Repositories [Savannah]
Savannah is a central point for development, distribution and maintenance of free software, both GNU and non-GNU.savannah.gnu.org
which I'm not so found about.
You should be, it was designed that way for a reason. Often you need to maintain the outdated system version so the system will stay stable. While you provide a local copy for your users to use. They can of course if they want to use the system resource instead. Most would not want to. Keep in mind you have to have root access to install to /usr/local/bin just like you would to install to /usr/bin. This system has worked quite well for over 50 years. There is no issue with it.
With that said no you would not want to have a program overshadow a system program if you did not know about it. Which is why it is recommended that you not put your Present Working Directory on the system path and if you do, to add it last, never to the front of the path.
plan-A likes this.
I correct that to 50 years. It originated in Unix. Neither env nor shebang was available in the original version of Unix 55 years ago (hence the correction). And the recommended way for the system path to be implemented is not dangerous at all, and neither is shebang.
You should, unless you happen to be maintaining system scripts, always use the #!/usr/bin/env bash form and never use the fully qualified path of the software. Let env find it on the path. This solves many issues. Such as not all software is installed the same place on all systems. Though where it is installed is on the system path.
plan-A likes this.
You are confusing issues with software executing from the Present Working Directory with installed software. It is not dangerous and never has been. Homebrew uses the strategy for a reason, it was designed to work that way. Homebrew did not implement this, it is the way Unix and Unix like systems work. And it works quite well. Even without your approval 😉. You just see everything as a danger.
plan-A likes this.

Unus Nemo
Unknown parent • •@plan-A
When using zsh just use
.cshetc in your ~/.config/profiled, you can use a directory named ~/.config/zshrc.d instead of ~/.config/bashrc.d, it will not hurt to setup the bash equivalent in and case in case you end up in a bash login at some point.And yes, the gist tells you that it is a Bash Configuration. Though it would be easy to translate to Zsh.
Of course their is not a need to organize you configuration in this way, it just simplifies things over the long run. It keeps everything in its own little compartment. It makes trouble shooting easier. This is especially true when you are administrating a multi-user system as I do.
Unus Nemo
Unknown parent • •@plan-A
I do not know when you looked at the gist but I made a few corrections just moment ago. That I screwed up when I was tired earlier today.