Work commonly used Linux Command 1, modify the password: passwd username www.2cto.com 2, download jdk-6u25-linux-i586.bin 3, run (cd to enter a directory,/usr/jdk-6u25-linux-i586.bin Decompression Operation) sh jdk-6u25-linux-i586.bin 4. Change the environment variable vi in the opadmin home directory. bash_profile www.2cto.com: edit the files in the user's home directory. bash_profile: Add the following content: export JAVA_HOME =/usr/java/jdk1.5.0 _ 10 export PATH = $ PATH: $ HOME/bin: $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin export CLASSPATH =.: $ JAVA_HOME/jre/lib/rt. jar: $ JAVA _ HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar remarks: Linux. bash_profile, bash_logout,. bashrc files have special significance for bash. You can modify these three files to enable the system to automatically set the personalized environment for your account. These files may exist in your home directory. If they do not exist, the system will configure them according to the/etc/profile file. 5. Set the soft link: ln-s 6. view the total disk space: df-h 7. display the disk space occupied by folders in the home Directory: du-sh (example: du-sh/home/*) 8: vi related operations: shift + g to the last line gg to the first line: wq save and exit: q! Force Exit:/keyword query by keyword from the current file, the next keyword is N 9, the file is obtained from the Network: wget 10, show all files (including hidden files ): ls-a 11. Only hide files: l. 12. display the files in the current folder: ll or ls 13. Modify the saved svn user password and clear the files in the following directory:/home/opadmin /. subversion/auth/14. delete the file: rm-rf 15. copy the file: cp 16. Rename the file: mv 17. Set (ADD) the gateway address: route add default gw 128.1.1.11 dev eth0 18. Modify the gateway address as follows (1) vi/etc/sysconfig/network (2: geteway = gateway ip (3) Save and exit: wq 19, view and set the system time: (1) view: date (2) Set: date: 1129212420 11.29 format: date Month day hour year. second 20, nohup command: nohup command, for example, we have a start. sh needs to run in the background, and you want to continue running in the background, use nohup, for example: (1) nohup/root/start. sh & (full path can be written) (2) or nohup. /start. sh & (can be written. /) after executing the preceding command, press enter in shell and prompt: [~] $ Appending output to nohup. out 21. view the process: ps view the java Process: ps-ef | grep java kill-9 <pid> 22. view the IP Address: ifconfig. If the command is not displayed, you can try to use the root user to view the file, or execute:/sbin/ifconfig 23 to upload a file in the directory to the ftp as follows: (1) first, enter the directory of the file to be uploaded, for example, cd/home/opadmin/irp/target (2) ftp address (3) enter the user name and password (4) put irp.zip irp/irp.zip 24. Add a project to be modified as follows: (1): the pom file of irp-application-main (2 ): the pom file of irp-application-ear (3): Modify releaseconf on 95. xml 25, restart command: (1), reboot (2), shutdown-r now restart immediately (for root users) (3) shutdown-r restarts automatically after 10 minutes (for root users) (4) and shutdown-r at (for root users) if you use the shutdown command to set the restart, you can use the shutdown-c command to cancel the restart command: (1), halt immediately shut down (2), poweroff immediately shut down (3) shutdown-h now shut down immediately (used by the root user) (4), shutdown-h shut down automatically 10 minutes later if shutdown is set through the shutdown command, you can use the shutdown-c command to cancel the restart 26, set the java environment variable (available for all users) to open vi/etc/profile, and add the following at the end: export JAVA_HOME =/usr/jdk/export PATH = $ JAVA_HOME/bin: $ PATH export CLASSPATH =.: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/lib/dt. jar: $ CLASSPATH 27. Check the current port usage. netstat-ntlp 28. Add a port to the firewall to solve the problem of application access failure. vi/etc/sysconfig/iptables (add a port: for example: -A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 8980-j ACCEPT) service iptables restart 29, view memory usage (1) free: memory usage of the current machine (2) top: memory usage of each process. shift + m can be used for sorting 30 and killing processes: kill-9 <pid> 31. View JVM heap usage: jmap-heap pid 32. Check GC status: jstat-gcutil pid 1000 1000 33. dump the current memory snapshot: jmap-dump: format = B, file =/home/longhao/heamdump. out <pid> 34. delete a row of files opened with vi: dd 35. Search for/search for files: find/-name *. docx (indicates searching for files with docx extension from the root path)