Unix / Linux: Initialize Dot Files Without Restarting The Current Shell Session

Unix / Linux: Initialize Dot Files Without Restarting The Current Shell Session

To initialize dot files (files that start with a .) without restarting the current shell session, you can use the source command.

For example, if you have made changes to your .bashrc file and you want to apply the changes without logging out and logging back in, you can use the source command to load the new configuration.

To do this, open a terminal and type the following command:

refer to‮ual:‬tturi.com
source ~/.bashrc

This will execute the .bashrc file and apply the changes to the current shell session.

You can use the source command with any dot file that you want to initialize. For example, to load the changes in your .bash_aliases file, you can use the following command:

source ~/.bash_aliases

Note: The source command is specific to the bash shell. If you are using a different shell, you may need to use a different command to initialize dot files. For example, in the zsh shell, you can use the . (dot) command instead of source.

Created Time:2017-10-30 14:27:30  Author:lautturi