How do you set a variable in Linux?

Lò Ngọc

New member
How do you set a variable in Linux?
Answer
Persisting Environment Variables for a User
  1. Open the current user’s profile into a text editor. vi ~/.bash_profile.
  2. Add the export command for every environment variable you want to persist. export JAVA_HOME=/opt/openjdk11.
  3. Save your changes.
 

Tìm kiếm

Back
Top