Knowledge of linux

Source: Internet
Author: User

A programmer must have knowledge about linux. Generally, large J2EE applications are constructed in a linux environment. In the development environment, we can map the local network drive using samba and perform programming and debugging in the windows environment directly. However, the final release is still in the linux environment. At the same time, we manage the applications of web servers and database servers (such as automatic script publishing) on the Internet ), application monitoring (whether the web Service is normal, mysql database usage), System Monitoring (Monitoring disk space usage, etc.) require programmers to familiarize themselves with the necessary linux knowledge. Of course, programmers do not have to be familiar with the entire linux system. The following describes the basic linux knowledge that programmers need based on their development experience. I. Basic linux commands 1. User Management userdel delete user account useradd Add add user account su change current user ID 2. File directory management ls browsing directory, view files and file names in the current directory chmod Modify file permissions chown change file owner cp copy file cd change current directory mv rename file or move file rm delete file or directory pwd current directory scp remote copy alias 3. Other command ln creates a link between the file and the part after the content of the tail output file, generally, we use tail-f to view the logs printed by the current program in real time. Type: view the number of lines in the wc directory where a command is located. grep: find the file in the file content. Search for the file date. view the date crontab to create a scheduled task, which is usually used for system monitoring. Df to view the remaining disk space. You 'd better write a script in the crontab to monitor the disk space. If the number exceeds 90%, an email is sent to the relevant personnel. Ps view Process status top view CPU usage kill terminate process killall java Programmers like to use killall-9 java w view login users and what they are doing, you can also look at the system load. The load is too high, so we should look for the reason. Who to view the current user's lunch situation tar decompression or compressed file echo console output wget http access rpm package management 4, redirection, pipeline 5, standard output, standard error 6, use/Shield One special characters 7. Regular Expressions 2. proficient in the vim editor. 3. Write shell scripts and perl scripts in the liunx environment. To manage online server applications, you usually need to write some scripts. Script Writing focuses on the following points: 1. Understand the meaning of double quotation marks, single quotation marks, and reverse quotation marks. 2. Use of backlash. 3. Do not add $ to the variable name on the left of the shell script value assignment statement. This error is often caused by perl scripts. 4. the string is long and contains spaces. When it is used as a parameter, a script error occurs. Double quotation marks are used to enclose the string. 5. Master the usage of awk and sed. 4. The general steps for installing the basic software package apache, eclipse, mysql, and jdk are as follows: configuremakemake install

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.