How to apply changes to shell files?

0177

To apply changes made to shell configuration files, you can use the source command or the . (dot) command followed by the file name. This will reload the configuration file in the current shell session without needing to restart the terminal. Here’s how to do it for common shell configuration files:

  1. For .bashrc:

    source ~/.bashrc
    

    or

    . ~/.bashrc
    
  2. For .bash_profile:

    source ~/.bash_profile
    

    or

    . ~/.bash_profile
    
  3. For .profile:

    source ~/.profile
    

    or

    . ~/.profile
    
  4. For .zshrc:

    source ~/.zshrc
    

    or

    . ~/.zshrc
    
  5. For .zprofile:

    source ~/.zprofile
    

    or

    . ~/.zprofile
    

After running the appropriate command, any changes you made to the configuration file will take effect immediately in the current terminal session.

0 Comments

no data
Be the first to share your comment!