Common Linux command experience in software development (Ubuntu as an example)

Source: Internet
Author: User

Software development process is unavoidably often to the host configuration or deployment operations, think of some to write some, and then update

Decompression command:

A. In the case of a tar file, use the "tar zxvf filename" directly;

B. If it is a zip file, use "Unzip filename";

Download and mount loading:

A. Download the file or script, "wget url";

B. Install the software, "Apt-get install software";

C. Uninstall the software, uninstall the software compared to the trouble "Apt-get purge software", so after deletion may have some residual configuration files, need to continue to run "Apt-get autoremove" and "Apt-get clean" to clear.

Some software is troublesome, there may be problems in the middle, need to abort the program, but the process will be locked, need "dpkg--configure-a" to liberate lock

To toggle Root permissions:

A. Some of the above about the software needs root authority, Bo Master is also smattering, need to add sudo prefix command, sometimes need to use the root permission for a long time, you need to get root permissions, so you can directly input instructions to operate;

B. There are generally three ways to get root privileges, simple is the SU command, but the SU command requires root password, need to switch back with SU + username, the other two sudo-i or sudo su command can be long-term access to root operations, Just enter the current account's password to

To edit and view commands:

A. More editing tools, usually useful to the vi,vim,nano,tee, the use of some differences (master A should be good), with more than the feeling or VI command, input "VI filename", you can see the contents of the file, if the below display read-only may be the file's permissions are not enough, Or the user's operating rights are insufficient;

B. After normal access to the text, if you want to update or insert the use of the command "I", if you want to delete the file content by row need to use "dd", if you delete multiple rows at once, then use the number (number of lines) + "DD"

C. The way to save the file is also various, more commonly used there are two (I am more commonly used), the first step is the keyboard "ESC", then enter ": wq!" Enter, if you do not want to save direct ": q!" Enter. Another kind is "shift" +z +z, direct preservation;

Ports and processes:

A. Commands about ports and processes Gray often, but bloggers commonly used three, mainly to see the port is occupied process, and then kill it, see the command to know:

sudo netstat-anp | grep 80 | grep LISTEN
sudo lsof-i:80
sudo kill-9 2097 2098 2099 2100

  

Common Linux command experience in software development (Ubuntu as an example)

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.