I have created a variable $JAVA_HOME in `/etc/environment'  JAVA_HOME="/usr/lib/jvm/jdk" PATH="...bla bla bla:$JAVA_HOME/bin"   I also edited /etc/profile to have source /etc/environment so that all users get Java home. and the directory itself has been made 755 for access.  The printout as root for env:  LANG=C.UTF-8     SUDO_GID=1000 USERNAME=root JAVA_HOME=/usr/lib/jvm/jdk SUDO_COMMAND=/bin/su USER=root PWD=/home/ssuser HOME=/root SUDO_USER=ssuser SUDO_UID=1000 MAIL=/var/mail/root TERM=xterm SHELL=/bin/bash SHLVL=2 LOGNAME=root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME/bin   But when I do the same as ssuser without sudo-ing, the environment variable $JAVA_HOME is expanded to the actual path.   SSH_CONNECTION=193.128.134.115 18497 10.1.4.4 22 LESSCLOSE=/usr/bin/lesspipe %s %s LANG=C.UTF-8 JAVA_HOME=/usr/lib/jvm/jdk XDG_SESSION_ID=2 USER=ssuser PWD=/home/ssuser HOME=/home/ssuser SSH_CLIENT=193.128.134.115 18497 22 XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop SSH_TTY=/dev/pts/0 MAIL=/var/mail/ssuser TERM=xterm SHELL=/bin/bash SHLVL=1 LOGNAME=ssuser XDG_RUNTIME_DIR=/run/user/1000 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/jdk/bin LESSOPEN=| /usr/bin/lesspipe %s   And this has nothing to do with what's set in /etc/sudoers for env_var reset/keep settings. Because I have tried this in a different computer and it works just fine.   I am slightly clueless as to why this is happening. Also, something very strange I have noticed is that for a single session sudo users aren't being prompted for password. I have checked /etc/sudoers and it is set up correctly to ask password for root.  I have tried closing the session and reopening. I can see as them as a normal user, not root. Also, rebooting doesn't do anything different.
I changed the /etc/environment to add more directories to the PATH variable. But looks like $PATH in double quotes were not expanded and I could find any command from the shell and /usr/bin/command-not-found is run.  $ cat /etc/environment  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" PATH="$PATH:/home/user/technical/java/maven/bin" JAVA_HOME="/home/user/technical/java/jdk7"   so from the tty,  $ echo $PATH $PATH:/home/user/technical/java/maven/bin   why did not the expansion happen?
Can I use an Android phone as webcam for an Ubuntu device? how to read xml file from url using php How to reduce AWS EBS root volume size? $AB-BA=I$ having no solutions The following question is from Artin's Algebra.      If $A$ and $B$ are two square matrices with real entries, show that $AB-BA=I$ has no solutions.    I have no idea on how to tackle this question. I tried block multiplication, but it didn't appear to work. How to extend summations to fractional orders? Is an integer a sum of two rational squares iff it is a sum of two integer squares? Let $a\in \mathbb Z$. Is it true that $a$ is a sum of two squares of rational numbers if and only if it is a sum of two squares of integers?  I came to face this problem while dealing with quaternion algebras. Should I set the title attribute for content DIV's to explain what they contain? I have a number of DIV's that break up a page into logical elements for styles and positioning, etc.  As part of optimizing my site for search engine spiders, should I include a title attribute within these DIV's?  (Yes I have a title as part of the whole page, I'm curious on individual structual elements)  Ex  ... &lt;div id="SearchOptions" title="Search filters and options - Type in a name or pick a business and Click 'Search' to get started" &gt;   .... &lt;/div&gt; ... How did the Tesseract come to Earth from Asgard? Based on , I figured that there might be multiple questions for distinct locales. Why do the most common transactions to or from bank accounts in the US require waiting one or more days before they are completed? In the information age, it seems like we should be able to transfer money instantly (or nearly so). The stress tensor can be written as: $$\sigma_{ij}=-p \delta_{ij}+\sigma'_{ij}\label{1}\tag{1}$$ where $\sigma_{ij}'$ is called the extra stress tensor.   From what I understand pressure is pressure is force per unit area, so that the force acting on the surface $d\vec A$ is given by:  $$\vec F=-p d\vec A\label{2}\tag{2}$$ (This has the effect that the force on an infinitesimally thin surface due to a continuous pressure is zero). However, $\sigma_{ij}$ represent the force in the $i$ direction on a surface with normal in the $\hat e_j$ direction. So the force acting on a surface $d \vec A$ must be: $$F_i=\sigma_{ij}dA_j\label{3}\tag{3}$$ Equations (2) and (3) clearly do not agree (even if we look soley at the force in the $d\vec A$ direction they don't agree). So my question is what is the exact meaning of pressure in expression (1) and why do we not have: $$\sigma_{ii}=-p$$ Why are certain example URLs like https://site.com/ and https://mysite.com/ blocked from post content? Why is  and  blocked from the post content on the main site? I tried to make a sample URL and I had to use  instead. Can a black hole absorb photons whose wavelengths are greater than the BH horizon size? A capacitor stores half the energy when charged from a battery each and every time? I understand that when a battery is connected to a capacitor that half the energy is stored in the capacitor while the other half is lost to heat or whatever other losses are involved once the capacitor is charged to the exact same voltage level of the battery.  Only a one time direct connection with a simple switch from open to closed that charges the capacitor up to the voltage level of the battery is what is being referred to. My question is does this occur each and every time?   Once the capacitor is charged to the voltage level of the battery then there should be 7.2 milliJoules of energy in the capacitor.  If the answer is yes that half the energy is transferred into the capacitor each and every time then what would the capacitor voltage have to be in order to equal 100% of the energy if it were to come from the battery?  I understand that in practice this will never happen, which is why the statement equal to 100% of the energy is indicated. (Meaning by some other method of charging means)         &ndash; Schematic created using Do vulnerability and resistance cancel out? Intuitive understanding of the elements in the stress-energy tensor There is an image in the Wikipedia about the :    I have a rough understanding of the stress tensor: you imagine cutting out a tiny cube from the fluid and form a matrix out of the forces on each side of it: it's not hard to see that the forces that push the faces outwards so the x direction of the force on the x side, the y direction of the force on the y side, etc. is the pressure, while other forces directions are the shear stress (these can be non-zero is some jelly-like substance).  Now the first question: Why is the lower half of the spatial part is the momentum flux, while only the upper one is the shear stress on the image? Is the image wrong? Isn't the spatial part describe the classical stress tensor?   The second question is: what's the intuition behind the temporal part?  So if I have a Minkowski spacetime and cut out a cube of it, then it's quite hard to see why "pressure" on the temporal face means density, also why "shear stresses" on the temporal face translate to momentum density, not speaking of the "temporal force components" the spatial faces...  Also stresses are measured in Pascals, mass density is measured in $kg/m^3$ while momentum density is in the units of $Ns/m^3$. These units doesn't seem to be compatible, but still they are in the same matrix, why?  EDIT: It has been pointed out that momentum flux refer to the entire blue part, it indeed have a lighter frame I didn't notice. Then yet another subquestion: what's the difference between the momentum density and momentum flux? Why does the command shuf file > file leave an empty file, but similar commands do not? I know this is sort of a duplicate of another question () but I wanted to expand on the question in response to the answers given.  The command  shuf example.txt &gt; example.txt  Returns a blank file, because the shell truncates the file before shuffling it, leaving only a blank file to shuffle. However,  cat example.txt | shuf &gt; example.txt  will produce a shuffled file as expected.  Why does the pipeline method work when the simple redirection doesn't? If the file is truncated before the commands are run, shouldn't the second method also leave an empty file? Remotely changing hard drive boot order, windows 7 I have one workstation chassis with two hard drives.  Depending on which one I boot from, I get one of two different operating systems: both are windows 7, but they have different static IPs, serve totally different purposes, etc.    The workstation has a modern asus motherboard, core i7 intel CPU, 32 GB ram.   Is there a way to remotely change which hard drive is booted from on a reboot?  Both systems have remote users, and i'd like a solution that is more elegant than being physically present and selecting boot order manually. One of the products being shown a CES is a  intended to let you charge a tablet from a laptop USB port that normally wouldn't work because it didn't provide enough power.  The CNET writeup implies that it's actually boosting the power output from the port beyond the normally available amount.  This seems improbable to me because the ports should have current protection to protect themselves from shorts.  Also, if it was possible to bypass the current limit externally, I'd've expected at least some tablet vendors to have included the ability to do so directly in their cables.  One possibility that occurs to me is that the dongle is just spoofing responses to the tablet when it queries the laptop about the maximum power it can deliver while only providing a trickle charge that the tablet would otherwise reject as too slow to bother with. Will reformatting my hard drive fix bad sectors on it? What is the difference between AOSP and AOKP?