Making Variables Persistent
I probably want my new PATH variable value assignment to be automatically made each time the system restarts. I don’t want to have to manually set the value of PATH and export it each time the system reboots.To do this, I can use the command to set the value of PATH to include /var/opt/mydb as well as the command to export the PATH variable to one of the following bash configuration files:
~/.bashrc
/etc/profile
~/.bash_profile
~/.bash_login
~/.profile
Adding the commands to a global bash configuration file such as /etc/profile will cause the change to be applied to all users. If you want to apply the change to only a single user, you should use the appropriate bash configuration file found in that user’s home directory.
You need to determine which files your particular distribution uses. For example, you could modify the following commands in the ~/.bash_profile file in the ksanders user’s home directory:
PATH=$PATH:$HOME/bin:/var/opt/mydb
export PATH
LX0-104 Exam Objectives (E)
I probably want my new PATH variable value assignment to be automatically made each time the system restarts. I don’t want to have to manually set the value of PATH and export it each time the system reboots.To do this, I can use the command to set the value of PATH to include /var/opt/mydb as well as the command to export the PATH variable to one of the following bash configuration files:
~/.bashrc
/etc/profile
~/.bash_profile
~/.bash_login
~/.profile
Adding the commands to a global bash configuration file such as /etc/profile will cause the change to be applied to all users. If you want to apply the change to only a single user, you should use the appropriate bash configuration file found in that user’s home directory.
You need to determine which files your particular distribution uses. For example, you could modify the following commands in the ~/.bash_profile file in the ksanders user’s home directory:
PATH=$PATH:$HOME/bin:/var/opt/mydb
export PATH
LX0-104 Exam Objectives (E)
No comments:
Post a Comment