Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 32253  / 1 Year ago, thu, february 2, 2023, 6:07:35

Problem: During Android development, in order to add ADB path to environment variable; I did following things:



gedit /etc/environment - Added my desired path in the file such as :/media/Software/00.AndroidLinux/ADT/sdk/platform-tools



What I noticed is that adding path to the file has no effect to $PATH until I reboot my Ubuntu.



My question is: How can I add path to /etc/environment variable, so that I can work with my modified $PATH, and without restarting Ubuntu?


More From » bash

 Answers
5

Strictly speaking you can't since that file is only read on login, by pam_env. You can however source it in your current shell to read in the values.



$ . /etc/environment

[#30599] Friday, February 3, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
raacket

Total Points: 198
Total Questions: 114
Total Answers: 111

Location: Czech Republic
Member since Mon, May 15, 2023
1 Year ago
raacket questions
;