How Permanently Save Environment Variables in Linux?
Contents How Do I Permanently Set an Environment Variable in Linux? to Make the Change Permanent, Enter the Command Path=$Path: /Opt/Bin into Your Home...
Contents
How do I permanently set an environment variable in Linux?
To make the change permanent, enter the command PATH=$PATH:/opt/bin into your home directory’s . bashrc file. When you do this, you’re creating a new PATH variable by appending a directory to the current PATH variable, $PATH .
Must Read
How do I permanently set environment variables in Ubuntu?
1 Answer
- Open a terminal window with Ctrl + Alt + T .
- Open the file for editing with gedit ~/.profile.
- Add the command to the bottom of the file.
- Save and close gedit.
- Log out and log in again.