How To Edit The Path 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. First, open the terminal window and type in the command ‘nano ~/.bashrc’
2. Within the .bashrc file you will see a section dedicated to the PATH environmental variable.
3. To add a new path just add it to the end of the path statement separated by a colon (:).
4. You can also remove a path from the list if it is no longer needed.
5. When finished making changes, save the file (Ctrl–O) and exit (Ctrl–X).
6. Finally, reload the environment using the command ‘source ~/.bashrc’.