How To Update Path Environment Variable In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Open your .bashrc file in your preferred text editing. This is usually located at ~/.bashrc
2. Add the following line to the end of the file: export PATH=$PATH:/your/custom/path
3. Replace ‘/your/custom/path’ with the path you want to add.
4. Save the file and then run the source command in the terminal window to update the path: source ~/.bashrc
5. Check if the path was updated by running the echo command: echo $PATH
You should see the new path listed in the output.