How Do I Permanently Set a Path in Linux for All Users?
Contents How Do I Set the Path for All Users in Linux? Steps Change to Your Home Directory. Cd $Home. Open The. Bashrc File. Add the Following Line to the...
Contents
How do I set the PATH for all users in Linux?
Steps
- Change to your home directory. cd $HOME.
- Open the . bashrc file.
- 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.
- Save the file and exit. Use the source command to force Linux to reload the .
Must Read
How do I permanently add a PATH in Linux?
To make the change permanent, enter the command PATH=$PATH:/opt/bin into your home directory’s . bashrc file. When you do this, you’re creating a new PATH variable by appending a directory to the current PATH variable, $PATH .