Daily Shaarli

All links of one day in a single page.

March 4, 2022

bash - How to reload .bashrc settings without logging out and back in again? - Stack Overflow

To complement and contrast the two most popular answers, . ~/.bashrc and exec bash:

Both solutions effectively reload ~/.bashrc, but there are differences:

. ~/.bashrc or source ~/.bashrc will preserve your current shell session:

Except for the modifications that reloading ~/.bashrc into the current shell (sourcing) makes, the current shell process and its state are preserved, which includes environment variables, shell variables, shell options, shell functions, and command history.
exec bash, or, more robustly, exec "$BASH"[1], will replace your current shell with a new instance, and therefore only preserve your current shell's environment variables (including ones you've defined ad hoc, in-session).

In other words: Any ad-hoc changes to the current shell in terms of shell variables, shell functions, shell options, command history are lost.
Depending on your needs, one or the other approach may be preferred.

Note: The above applies analogously to other shells too:

To apply the exec approach to whatever your default shell is, use exec $SHELL
Similarly, the sourcing approach requires you to know and specify the name of the shell-specific initialization file; e.g., for zsh: . ~/.zshrc

[1] exec bash could in theory execute a different bash executable than the one that started the current shell, if it happens to exist in a directory listed earlier in the $PATH. Since special variable $BASH always contains the full path of the executable that started the current shell, exec "$BASH" is guaranteed to use the same executable.
A note re "..." around $BASH: double-quoting ensures that the variable value is used as-is, without interpretation by Bash; if the value has no embedded spaces or other shell metacharacters (which is likely in this case), you don't strictly need double quotes, but using them is a good habit to form.

webtrees - the web’s leading online collaborative genealogy application

the web’s leading online collaborative genealogy application

webtrees is open-source software, which means it’s constantly improved by a community of developers and costs $0 - yes, that means totally FREE! All you need to use it is a website with PHP and MySQL installed.

It works from standard GEDCOM files, and is therefore compatible with every major desktop application; and it aims to be efficient and effective by using the right combination of third-party tools, design techniques and open standards.

Ukrainians Are Winning The Information War

The ability to mobilize civil society, through media in particular, can tip the scales towards victory or defeat as much as bombs and tanks.

About Us | Blackstone Laboratories

Established in in 1985, Blackstone Laboratories strives to provide an easy-to-use, understandable, fast, and accurate oil analysis program.

At the heart of our program is ICP (inductive coupled plasma) spectrometry, database averages for comparing wear, and a comments section on each report that explains — in plain English! — what your results mean.

To get started, just fill out our kit request form for a free sampling kit. The cost of analysis is $30.00. We also have a discount analysis program, if you’re interested in a price break.