Modify environment variables and validation methods in Linux

  • 2020-05-14 05:47:02
  • OfStack

Add variables to the /etc/profile file [active for all users (permanent)]

Add a variable to the file /etc/profile file with VI. This variable will be valid for all users under Linux and will be "permanent".

For the change to take effect immediately, you need to execute the following code


source /etc/profile

Related articles: