title: how to properly edit the /etc/environment file?
body: <p>I'm trying to transfer my end of environment variables .bashrc file to the end of the /etc/environment file.</p>
  
  <p>But every time I change this file can not login on the computer and to undo the changes through the display mode CTRL+ALT+F2, then to save time, I wonder if my configuration is correct before restarting my computer .</p>
  
  <pre><code>PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
  JAVA_HOME="/usr/lib/jvm/java-8-oracle/​"
  CLASSPATH="JAVA_HOME/lib/:$CLASSPATH"
  PATH="$JAVA_HOME/bin/:$PATH"
  M2_HOME="/usr/share/maven/"
  M2="$M2_HOME/bin"
  PATH="$M2:$PATH"
  </code></pre>
  
  <p>I made the changes as root, it is correct the way edited /etc/environment the file?</p>