Ubuntu environment variable configuration file

  
        

Several configuration files commonly used by Ubuntu mainly include the following:

/etc/environment, /etc/profile, /etc/bash.bashrc, ~/.profile, ~/.bashrc

The difference between them:

1/etc/environment

This file is the first configuration file read by Ubuntu when logging in, setting the environment for all processes. Variable

2/etc/profile

The second file read during this file is used to configure environment variables for all users in the system

3/etc/bash .bashrc

Initialization file for all users when opening the shell (user interface)

4~/.profile

Configuring the personal working environment of the currently logged in user
>

5~/.bashrc

Initialization file for the current user each time the shell is opened

Order of execution:

/etc/environment--> /etc/profile--> ~/.profile--> /etc/bash.bashrc--> ~/.bashrc

Instructions to make environment variables take effect:

source /xxx

Copyright © Windows knowledge All Rights Reserved