How Do I Permanently Add a Path in Linux?
Contents 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...
Contents
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 .
How do I permanently add a path?
3 Answers
- Open a terminal window using Ctrl+Alt+T.
- Run the command gedit ~/.profile.
- Add the line. export PATH=$PATH:/media/De Soft/mongodb/bin. to the bottom and save.
- Log out and log in again.
27 мар. 2017 г.
Must Read
How do you add a file path in Linux?
Linux
- Open the . bashrc file in your home directory (for example, /home/your-user-name/. bashrc ) in a text editor.
- Add export PATH=”your-dir:$PATH” to the last line of the file, where your-dir is the directory you want to add.
- Save the . bashrc file.
- Restart your terminal.