Common commands and application scenarios in Linux and Common commands in linux

Source: Internet
Author: User

Common commands and application scenarios in Linux and Common commands in linux
1. Switch users

Command: su-paytest. Press enter to enter the password.

2. view the File System

Command: df-a (used to view the usage of the file system)

Command: du-shx * (used to list the size of all folders)

3. connect to other servers through SSH

Command: ssh paytest@210.32.22.51, enter the password.

4. send packets using Telnet commands

Command: telnet 210.32.22.51 5010. Press enter and enter the content of the message to be sent.

5. Permanent path alias setting

Command: vi ~ /. Bash_profile

Add: alias log = 'CD/app/applogs'

Command: source ~ /. Bash_profile

6. Related commands for compressed packages:

Tar package compression: tar-cvf filename.tar test1 test2 ......

Decompress the tar package: tar-xvf filename.tar

Tar package browsing: tar-tvf filename.tar

------------------------------------------------------------------

Zip package compression: zip-r/app/filename.zip/app/filename/

Decompress the zip package: unzip filename.zip

7. Check whether the ports under the server are enabled normally.

Command: netstat-lnp | grep 61616 (check whether the ActiveMQ Message Queue Service is started properly)

8. File Transfer between servers

Command: scp filename user @ IP: Path

Example: scp key.txt paytest@210.32.22.51:/app/keytest/

Note: user is the target host user name and IP is the IP address of the target host.

 

(To be continued ...)

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.