How do you set a PATH variable in Linux?

Huyền Thu

New member
How do you set a PATH variable in Linux?
Answer
To Set PATH on Linux
  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 .
 

Tìm kiếm

Back
Top