How Do You Run Bashrc File in Linux?

How Do You Run Bashrc File in Linux?
Contents

How do I run a .bashrc file in Linux?

Steps

  1. Change to your home directory. cd $HOME.
  2. Open the . bashrc file.
  3. Add the following line to the file. Replace the JDK directory with the name of your java installation directory. export PATH=/usr/java/<JDK Directory>/bin:$PATH.
  4. Save the file and exit. Use the source command to force Linux to reload the .

How do I open a .bashrc file?

bashrc files. Now, you will edit and (and “source”) the ~/. bashrc file. I noticed that pure exec bash command will preserve the environment variables, so you need to use exec -c bash to run bash in an empty environment.

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.