Set environment variable $PATH globally on Ubuntu 14.04
I am trying to add environment path variable of composer globally. I've tried many ways but it does not seem to work. I searched other posts, but did not find matching answers.
I am trying to configure laravel 5+ but I need to add the composer path globally in order to access "laravel" syntax using a terminal.
A temporary path set using Terminal works, but permanent path set does not. How do I do this?
ubuntu environment-variables path
add a comment |
I am trying to add environment path variable of composer globally. I've tried many ways but it does not seem to work. I searched other posts, but did not find matching answers.
I am trying to configure laravel 5+ but I need to add the composer path globally in order to access "laravel" syntax using a terminal.
A temporary path set using Terminal works, but permanent path set does not. How do I do this?
ubuntu environment-variables path
add a comment |
I am trying to add environment path variable of composer globally. I've tried many ways but it does not seem to work. I searched other posts, but did not find matching answers.
I am trying to configure laravel 5+ but I need to add the composer path globally in order to access "laravel" syntax using a terminal.
A temporary path set using Terminal works, but permanent path set does not. How do I do this?
ubuntu environment-variables path
I am trying to add environment path variable of composer globally. I've tried many ways but it does not seem to work. I searched other posts, but did not find matching answers.
I am trying to configure laravel 5+ but I need to add the composer path globally in order to access "laravel" syntax using a terminal.
A temporary path set using Terminal works, but permanent path set does not. How do I do this?
ubuntu environment-variables path
ubuntu environment-variables path
edited Oct 18 '15 at 21:01
Thomas Dickey
52.3k594165
52.3k594165
asked Jul 16 '15 at 12:05
DpENDpEN
113114
113114
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You can change the settings in /etc/environment
which contains a definiton of the $PATH
variable, or add an entry to the system-wide bashrc ( /etc/bash.bashrc
which is not as universal as changing the environment setting (i.e. only for bash and if the system-wide bashrc is actually loaded).
/etc/environment
, yes./etc/bash.bashrc
, no that would only set the variable in interactive shells, not elsewhere (applications started from a menu, cron jobs, etc.). Never set environment variables in.bashrc
, only interactive shell settings.
– Gilles
Jul 16 '15 at 22:19
@Gilles, Do I have to reboot the Ubuntu 16.04 desktop computer after adding an environment variable key-value combination to /etc/environment? Thank you very much.
– Frank
Jul 25 '16 at 13:58
@Frank The easiest way is to log out and back in.
– Gilles
Jul 25 '16 at 14:08
@Gilles. Thank you for your great answer to my question. Could I also export MONO_WINFORMS_XIM_STYLE=disabled using /etc/environment so that any programs which run from either the terminal monodevlelop,doubleclick take this environment variable ?
– Frank
Jul 25 '16 at 14:42
@Frank Sure, you can put any environment variable there. Remember that the syntax is justMONO_WINFORMS_XIM_STYLE=disabled
, noexport
, this isn't a shell script.
– Gilles
Jul 25 '16 at 16:41
add a comment |
@Gilles, Hi Gilles, I have installed Magento 2 and it is well accessible on browser but I couldn't be able to run commands on CLI. Please help. Should I have to set environment variables and if it is, then what should I set? Pls help.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f216444%2fset-environment-variable-path-globally-on-ubuntu-14-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can change the settings in /etc/environment
which contains a definiton of the $PATH
variable, or add an entry to the system-wide bashrc ( /etc/bash.bashrc
which is not as universal as changing the environment setting (i.e. only for bash and if the system-wide bashrc is actually loaded).
/etc/environment
, yes./etc/bash.bashrc
, no that would only set the variable in interactive shells, not elsewhere (applications started from a menu, cron jobs, etc.). Never set environment variables in.bashrc
, only interactive shell settings.
– Gilles
Jul 16 '15 at 22:19
@Gilles, Do I have to reboot the Ubuntu 16.04 desktop computer after adding an environment variable key-value combination to /etc/environment? Thank you very much.
– Frank
Jul 25 '16 at 13:58
@Frank The easiest way is to log out and back in.
– Gilles
Jul 25 '16 at 14:08
@Gilles. Thank you for your great answer to my question. Could I also export MONO_WINFORMS_XIM_STYLE=disabled using /etc/environment so that any programs which run from either the terminal monodevlelop,doubleclick take this environment variable ?
– Frank
Jul 25 '16 at 14:42
@Frank Sure, you can put any environment variable there. Remember that the syntax is justMONO_WINFORMS_XIM_STYLE=disabled
, noexport
, this isn't a shell script.
– Gilles
Jul 25 '16 at 16:41
add a comment |
You can change the settings in /etc/environment
which contains a definiton of the $PATH
variable, or add an entry to the system-wide bashrc ( /etc/bash.bashrc
which is not as universal as changing the environment setting (i.e. only for bash and if the system-wide bashrc is actually loaded).
/etc/environment
, yes./etc/bash.bashrc
, no that would only set the variable in interactive shells, not elsewhere (applications started from a menu, cron jobs, etc.). Never set environment variables in.bashrc
, only interactive shell settings.
– Gilles
Jul 16 '15 at 22:19
@Gilles, Do I have to reboot the Ubuntu 16.04 desktop computer after adding an environment variable key-value combination to /etc/environment? Thank you very much.
– Frank
Jul 25 '16 at 13:58
@Frank The easiest way is to log out and back in.
– Gilles
Jul 25 '16 at 14:08
@Gilles. Thank you for your great answer to my question. Could I also export MONO_WINFORMS_XIM_STYLE=disabled using /etc/environment so that any programs which run from either the terminal monodevlelop,doubleclick take this environment variable ?
– Frank
Jul 25 '16 at 14:42
@Frank Sure, you can put any environment variable there. Remember that the syntax is justMONO_WINFORMS_XIM_STYLE=disabled
, noexport
, this isn't a shell script.
– Gilles
Jul 25 '16 at 16:41
add a comment |
You can change the settings in /etc/environment
which contains a definiton of the $PATH
variable, or add an entry to the system-wide bashrc ( /etc/bash.bashrc
which is not as universal as changing the environment setting (i.e. only for bash and if the system-wide bashrc is actually loaded).
You can change the settings in /etc/environment
which contains a definiton of the $PATH
variable, or add an entry to the system-wide bashrc ( /etc/bash.bashrc
which is not as universal as changing the environment setting (i.e. only for bash and if the system-wide bashrc is actually loaded).
answered Jul 16 '15 at 12:18
FiximanFiximan
3,158625
3,158625
/etc/environment
, yes./etc/bash.bashrc
, no that would only set the variable in interactive shells, not elsewhere (applications started from a menu, cron jobs, etc.). Never set environment variables in.bashrc
, only interactive shell settings.
– Gilles
Jul 16 '15 at 22:19
@Gilles, Do I have to reboot the Ubuntu 16.04 desktop computer after adding an environment variable key-value combination to /etc/environment? Thank you very much.
– Frank
Jul 25 '16 at 13:58
@Frank The easiest way is to log out and back in.
– Gilles
Jul 25 '16 at 14:08
@Gilles. Thank you for your great answer to my question. Could I also export MONO_WINFORMS_XIM_STYLE=disabled using /etc/environment so that any programs which run from either the terminal monodevlelop,doubleclick take this environment variable ?
– Frank
Jul 25 '16 at 14:42
@Frank Sure, you can put any environment variable there. Remember that the syntax is justMONO_WINFORMS_XIM_STYLE=disabled
, noexport
, this isn't a shell script.
– Gilles
Jul 25 '16 at 16:41
add a comment |
/etc/environment
, yes./etc/bash.bashrc
, no that would only set the variable in interactive shells, not elsewhere (applications started from a menu, cron jobs, etc.). Never set environment variables in.bashrc
, only interactive shell settings.
– Gilles
Jul 16 '15 at 22:19
@Gilles, Do I have to reboot the Ubuntu 16.04 desktop computer after adding an environment variable key-value combination to /etc/environment? Thank you very much.
– Frank
Jul 25 '16 at 13:58
@Frank The easiest way is to log out and back in.
– Gilles
Jul 25 '16 at 14:08
@Gilles. Thank you for your great answer to my question. Could I also export MONO_WINFORMS_XIM_STYLE=disabled using /etc/environment so that any programs which run from either the terminal monodevlelop,doubleclick take this environment variable ?
– Frank
Jul 25 '16 at 14:42
@Frank Sure, you can put any environment variable there. Remember that the syntax is justMONO_WINFORMS_XIM_STYLE=disabled
, noexport
, this isn't a shell script.
– Gilles
Jul 25 '16 at 16:41
/etc/environment
, yes. /etc/bash.bashrc
, no that would only set the variable in interactive shells, not elsewhere (applications started from a menu, cron jobs, etc.). Never set environment variables in .bashrc
, only interactive shell settings.– Gilles
Jul 16 '15 at 22:19
/etc/environment
, yes. /etc/bash.bashrc
, no that would only set the variable in interactive shells, not elsewhere (applications started from a menu, cron jobs, etc.). Never set environment variables in .bashrc
, only interactive shell settings.– Gilles
Jul 16 '15 at 22:19
@Gilles, Do I have to reboot the Ubuntu 16.04 desktop computer after adding an environment variable key-value combination to /etc/environment? Thank you very much.
– Frank
Jul 25 '16 at 13:58
@Gilles, Do I have to reboot the Ubuntu 16.04 desktop computer after adding an environment variable key-value combination to /etc/environment? Thank you very much.
– Frank
Jul 25 '16 at 13:58
@Frank The easiest way is to log out and back in.
– Gilles
Jul 25 '16 at 14:08
@Frank The easiest way is to log out and back in.
– Gilles
Jul 25 '16 at 14:08
@Gilles. Thank you for your great answer to my question. Could I also export MONO_WINFORMS_XIM_STYLE=disabled using /etc/environment so that any programs which run from either the terminal monodevlelop,doubleclick take this environment variable ?
– Frank
Jul 25 '16 at 14:42
@Gilles. Thank you for your great answer to my question. Could I also export MONO_WINFORMS_XIM_STYLE=disabled using /etc/environment so that any programs which run from either the terminal monodevlelop,doubleclick take this environment variable ?
– Frank
Jul 25 '16 at 14:42
@Frank Sure, you can put any environment variable there. Remember that the syntax is just
MONO_WINFORMS_XIM_STYLE=disabled
, no export
, this isn't a shell script.– Gilles
Jul 25 '16 at 16:41
@Frank Sure, you can put any environment variable there. Remember that the syntax is just
MONO_WINFORMS_XIM_STYLE=disabled
, no export
, this isn't a shell script.– Gilles
Jul 25 '16 at 16:41
add a comment |
@Gilles, Hi Gilles, I have installed Magento 2 and it is well accessible on browser but I couldn't be able to run commands on CLI. Please help. Should I have to set environment variables and if it is, then what should I set? Pls help.
New contributor
add a comment |
@Gilles, Hi Gilles, I have installed Magento 2 and it is well accessible on browser but I couldn't be able to run commands on CLI. Please help. Should I have to set environment variables and if it is, then what should I set? Pls help.
New contributor
add a comment |
@Gilles, Hi Gilles, I have installed Magento 2 and it is well accessible on browser but I couldn't be able to run commands on CLI. Please help. Should I have to set environment variables and if it is, then what should I set? Pls help.
New contributor
@Gilles, Hi Gilles, I have installed Magento 2 and it is well accessible on browser but I couldn't be able to run commands on CLI. Please help. Should I have to set environment variables and if it is, then what should I set? Pls help.
New contributor
New contributor
answered 26 mins ago
Wasim AkramWasim Akram
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f216444%2fset-environment-variable-path-globally-on-ubuntu-14-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown