Common commands for VPS hosts

Source: Internet
Author: User
Tags vps
Common commands on a VPS host are in the following format: command name [parameter] [path]. [] indicates that the command name can be omitted, and the omitted path indicates that the current path is applicable. Www.2cto.com has two types of paths: relative path and absolute path. the absolute path is based on the root directory (/), such as/home/share generation... common commands on a VPS host are in the following format: command name [parameter] [path]. [] indicates that the command name can be omitted, and the omitted path indicates that the current path is applicable. Www.2cto.com has two types of paths: Relative and absolute. absolute paths start from the root directory ("/"). For example,/home/share represents the share subdirectory in the home directory under the root directory, the relative path refers to the path starting from the current path. for example, if the current path is/home, share/doc indicates the absolute path/home/share/doc, ". "indicates the current directory," .. "indicates the upper-level Directory. If you do not know how to use a command, you can use the man command for reference. However, we generally cannot remember the specific parameters of the command. you only need to add-help after the command name, for example, ls-help. If you want to exit but do not know how to do it during command running, you can generally try Ctrl + C, Ctrl + D, quit. Cd to change the path. for example, after a user logs on, the default path is his/her user directory ~) You can directly return to the user directory. Cd/switch the path to the root directory. Ls displays the files and directories under the specified directory. ls-a can display all contents including hidden files, and ls-l is the list display. Mkdir: create a directory. an error occurs when a parent directory does not exist in the specified path by default. use the-p parameter. Rm deletes files. by default, directories cannot be deleted. you can use the-r parameter to recursively delete directories and their contents. Move or rename a music video file. Cp copies files. by default, directories cannot be copied. you can use the-parameter to copy directories and all projects in the directories. Cat displays the file content, more and less all display the file content by page. The tar package program can be compressed or decompressed with some parameters. generally, we use VPS to decompress the package more frequently and use the parameter-xvf to decompress the package *. tar file, use-xzvf to decompress * .tar.gz, and use-xjvf to decompress * .tar.bz2. if you need to decompress *. zip or *. for the rarfile, install the corresponding compression software and decompress it with the unzip and unrar commands. Df-h to view hard disk usage. Free refer to the memory status. Top view process status. Chmod changes the file permission + R to recursively change the file permission. Chown changes the file owner and all groups. The software package manager in yum CentOS/Fedora uses apt software package manager in Ubuntu/Debian. Nano, vi, and vim are both text editors, which use a lot of content. I will not introduce it here. Find command. Export is used to set or display environment variables.
Related Article

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.