Linux system environment variable configuration file introduction

  

There are several files in Ubuntu to set the environment variable /etc/profile: the first file used by the operating system to customize the user environment when logging in, this file is the system Each user sets environment information, which is executed when the user logs in for the first time. /etc/environment: The second file used by the operating system when logging in. The system sets the environment variables of the environment file before reading your own profile. ~/.profile: The third file used during login is the .profile file. Each user can use this file to enter the shell information dedicated to their own use. When the user logs in, the file is only executed once! Default Next, he sets some environment variables and executes the user's .bashrc file. /etc/bashrc: Execute this file for each user running the bash shell. When the bash shell is opened, the file is read. ~/.bashrc: This file contains bash information specific to your bash shell when logging in The file is read each time and every time a new shell is opened.



Copyright © Windows knowledge All Rights Reserved