To initialize dot files without restarting the current shell session, you can use the source
command. The source
command is used to run a script in the current shell environment, without starting a new shell process.
For example, if you have made changes to your .bashrc
file and want to apply the changes without logging out and back in, you can use the following command:
source ~/.bashrc
This will run the .bashrc
file in the current shell session, updating the environment with the new settings.
Similarly, you can use the source
command with any other dot file, such as .bash_profile
, .alias
, etc., to initialize the changes without restarting the current shell session.