Reprinted: Summary of several important commands of Ubuntu terminal

Source: Internet
Author: User
Tags file copy

Reprinted from: https://zhidao.baidu.com/question/1671709595114856107.html

Directory and file-related commands
    • PWD: The absolute path used to display the current location. Format: PWD, the default user root directory for/home/your user name.
    • LS: Used to display files in the current directory, only non-hidden files are displayed by default. Format: LS.
    • CD: Used to change your working directory. Format: CD working directory (commonly used with LS, tab-padded), and CD/command is to enter the root directory; The command is entered into the previous directory, and the CD-command is returned to the previous directory entry.
    • CP: Copy command, Format: CP file 1 path file 2 path, and copy command format cp-r directory 1 path directory 2 path
    • RM: Delete command, Format: RM file path, delete directory using Rm-r directory path
    • RmDir: Delete Empty directory, non-empty directory using RM-R format
    • mkdir: Create a new directory under current directory, format: mkdir folder name
    • Man: Find a command verbose usage, format: Man a command. Ubuntu Chinese man Manual configuration method: Man By default is in English, but the source of Ubuntu also has the Chinese version. The following are the configuration methods. Terminal input sudo apt-get install Manpages-zh, modify config file after installation sudo gedit/etc/manpath.config, replace all/usr/share/man with/usr/share/man/zh _CN, save it.
Package Management Commands
    • Install software: apt-get install software 1 software 2
    • Uninstalling software: Apt-get remove software 1 software 2
    • Uninstall and clear the configuration: Apt-get remove--purge software name
    • Update software information Database Apt-get update
    • Perform a system upgrade Apt-get upgrade
    • Search Packages Apt-cache Search softname1 softname2 softname3 ...

    • Installing the Deb package Dpkg-i Xxx.deb
    • Remove the Deb package dpkg-r Xxx.deb
    • Remove Dpkg-r--purge xxx.deb along with the configuration file
    • View Deb Package information Dpkg-info Xxx.deb
    • View the Deb file copy details Dpkg-l xxx.deb
    • View the Deb package information that is installed on the system dpkg-l
    • Reconfigure the DEB package dpkg-reconfigure xxx
System Information Commands
    • DF (shows how much space is left in the file system): This command shows the amount of space used for all mounted devices. It might be better to use df-h, because-H stands for human-readable, which uses megabytes m and gigabyte G to display device space usage, and the default is expressed in kilobytes K.
    • Du (shows the specific size of a file or directory in a directory): This command can list the specific usage of files and directories, much more than DF. (Take floppy folder as an example)
    • Free: Displays memory usage, also by default in kilobytes K, to be represented in megabytes m, add the parameter, i.e. free-m.
    • UNAME-A (Show all system Information): output system all information, including hostname, kernel name and version, hardware information and so on.
    • Lsb_release-a (Displays the currently used version)

Reprinted: Summary of several important commands of Ubuntu terminal

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.