A. Linux modification profile file changed the wrong way, restore the method in the change, the
problem, in addition to the CD other than the basic command can not be used,
Even VI can not use, the Internet check the next, with export path=/usr/bin:/usr/sbin:/bin:/sbin:/usr/x11r6/bin,
and then you can use the command, Speed with VI to change the profile back, return to normal. shell commands are basically defined in/usr/bin,/usr/sbin,/bin,/sbin,/usr/x11r6/bin.
so as
long as the orders are taken back, they can be used, and they are a remedy.
Two. Ways to configure the Java environment
1. Modify the/etc/profile file (System effective)
(1) #root > Vi/etc/profile
(2) Use the VI Editor to add the following statement to the profile file:
java_home=/opt/jdk1.5
Path=$java_home/bin:$path
Classpath=.$java_home/lib/dt.jar:java_home/lib/tools.jar
Export Java_home,path,classpath
(3) Re-login