Linux commands frequently used in work (continuous update)

Source: Internet
Author: User
Recently, due to work requirements and frequent access to Linux, we listed frequently used commands for future reference.

1. PS-Ef | grep process name (this process name can be a fuzzy value)

According to the query results, you can get the process number, namely, PID, and then force kill-9 PID to kill the process.

This command is frequently used due to the recent maintenance of Linux projects. Our projects are developed in windows and then deployed on Linux, in each regression test, the modified files are sent to me, And then uploaded to the corresponding directory to overwrite the original source files, for example: JS files, compiled class files, etc. In this way, the server needs to be restarted, so the process must be killed first. Otherwise, the port is occupied.

 

2. VI file name

This command is used to modify the file content. At that time, because the development environment and test environment are not on the same server, the application must be modified frequently. the database IP address in the properties file, so this command is frequently used.

 

 

 

3../Catalina. Sh run &

Since Tomcat is the server used in the recent project, it is particularly important to start and close Tomcat server commands. Go to the bin directory under the Tomcat directory, enter./Catalina. Sh run &, and press Enter. Use this command to view the log information printed during the startup process, for example, whether the port number is occupied. "&" Indicates that after the command is executed, you can press enter again, and then enter other commands, the "&" symbol can be used to run the command in the background .. The/startup. Sh command can also start the Tomcat server. However, if the SSH window is closed, the Tomcat server is also closed.

 

 

 

4 ../shutdown. Sh

This command is used to shut down the Tomcat server. Enter the bin directory under the Tomcat directory, enter./shutdown. Sh, and press Enter.

 

 

5. Su-Oracle

It is equivalent to logging on again. The user's home directory, path, and other information will change.

 

6. Su Oracle

After switching to the Oracle Identity, the user's home directory and path are still the original user's home directory and Path

 

 

 

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.