New answers tagged

3

You need to log out of your user session and log back in again for changes made to /etc/environment to take effect. But you can make it work immediately by running this: source /etc/environment && export PATH I found that very useful command here on Stack Overflow


1

You must add the code in ~/.profile. Example: Make a copy of path variable before doing this procedure. In ~/.profile, there is a section like this: # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi So, add at this at the end of the file: PATH="/usr/lib/jvm/java-8-oracle:/usr/lib/jvm/...


5

Possible methods: 1st try to log in using a TTY (control-alt-f1). If that does not work boot from a live DVD. and then use sudo nano /etc/environment from command line and edit out your mistake. Save and reboot to test what you did is correct. In case you need it: $ more /etc/environment PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/...


0

Nashorn requires certain syntax, change your script for (check the shebang!): #!/usr/bin/jjs -fv print("Arguments: " + $ARG); print($ARG); // arg1, arg2 print($ARG[0]); // arg1 And when executing, you can use: jjs -scripting asdf.js -- arg1 arg2 Will print: Arguments: arg1,arg2 arg1,arg2 arg1


12

C stands for the C programming language. It is a synonym for the POSIX locale. See http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html#tag_07_02 The POSIX locale can be specified by assigning to the appropriate environment variables the values "C" or "POSIX".


17

This is not a security risk at all, because you can always only set environment variables for your current environment (e.g. current Bash session) and, using the export command, its child environments (scripts you launch, subshells, etc.). It's impossible to escalate an environment variable created or modified into the parent environment. This includes that ...


0

I seem to have resolved the problem by running pax11publish -r Now, xprop -root | grep PULSE shows: PULSE_SERVER(STRING) = "{9899a0f46bdae6bbc8e6e8b200000005}unix:/home/user1/.pulse/9899a0f46bdae6bbc8e6e8b200000005-runtime/native" Apparently pulseaudio --check should normally go to the command prompt. Apparently this indicates it is running.


0

Shell Variable: Short Term, Applied only to current instance of the shell, Not applicable system wide Environmental Variable: Long Term Usage, Valid System Wide, Globally Allowed By convention Shell Variable have their name as lowercase while Envn. Variables are written as uppercase


0

I had the same problem, what I did was to create a /etc/default/elastic file with the next line inside: JAVA_HOME=/pathto/jdk


1

My speculations about the problem having to do with the PATH variable in fact turned out to be correct. I had added a new path in the file /etc/environment, but instead of adding it to the end of the already existing row with paths, I added it as a new line afterwards (as I wasn't sure how it should be done and just thought I'd give it a try). Apparently ...


1

Shell environment variables are used for several purposes, from storing data, storing software configurations, set terminal settings, and changing shell environment. The environment variables are normally set at boot time, or by different software as required. One way of setting environmental variables is from the command line. List all variables on ...


1

While Vedeonauth's answer is completely valid for the current process, it sounds like you're asking for all of the installed applications. So to get the environment of all running applications do: sudo find /proc -name environ -maxdepth 2 | xargs cat | xargs --null --max-args=1 (Thanks to this answer for the part at the end which turns the null-delimited ...


5

Well while I'm not really sure if this is what you want, you can get all the shell variables with the following commands: set -o posix set Or if you want it in an easily scrollable way you can pipe it through less like the following: ( set -o posix ; set ) | less This will provide, like @heemayl stated in his comment, all shell variables of which env ...



Top 50 recent answers are included