Common Commands under Ubuntu

Source: Internet
Author: User

Basic command:

CD path (enter a path, such as/usr/local/lib)

Cd.. (Return to previous folder)

LS (displays all files under the current folder, Linux unique, dir also has the same function)

PWD (show current path)

sudo command (get Super admin permission, need to enter password)

Common new, delete, copy commands:

mkdir Directory Name (new folder, folder in Linux system called "directory")

Touch file name (create a new empty file)

RmDir Directory Name (delete an empty folder, the contents are not available in the folder)

RM-RF a non-empty directory name (delete a folder that contains files)

RM File name (delete multiple files)

CP File name target path (copy a file to the target path, such as CP Hserver/opt/hqueue)

Cp-i (copy, when a file of the same name exists, output [yes/no] asks whether to execute)

Cp-f (Force copy file, if same name not asked)

Common decompression, installation program, file Update command:

TAR-ZXVF *.tar.gz (extract tar.gz formatted files)

SOURCE *.install (installs installation package installed in install format)

SH Path/x.sh (installs the SH format file, such as sudo sh/home/hp/downloads/*.sh)

sudo dpkg-i *.deb (install. deb package)

Deb is the Debian Linus installation format, very similar to Red Hat rpm, the most basic installation command is: dpkg-ifileThe . Deb Dpkg is a shorthand for the Debian package, a suite management system specifically developed for Debian, which facilitates the installation, updating and removal of software. All Linux distributions originating from Debian use dpkg, such as Ubuntu, Knoppix, and so on. Here are some common uses of Dpkg:1, Dpkg-i <package.deb>Install a Debian package, such as files you have manually downloaded. 2, Dpkg-c <package.deb>List<package.deb>the content. 3, Dpkg-i <package.deb>from<package.deb>To extract the package information. 4, Dpkg-r <package>Remove a package that has already been installed. 5, Dpkg-p <package>completely clears an installed package. Unlike remove, remove just deletes the data and executable files, and purge also removes all the configuration files. 6, Dpkg-l <package>List<package> List of all files installed. Please also see dpkg-c to check the contents of a. deb file. 7, Dpkg-s <package>displays information about the packages that have been installed. Also see apt-cache shows the package information in the Debian archive, as well as dpkg-I to display the package information extracted from a. deb file. 8, Dpkg-reconfigure <package>reconfigure an already installed package if it is using debconf (debconf provides a unified configuration interface for package installation). 
about the. Deb Package

sudo apt-get upgrade (update installed packages)

sudo apt-get update (update source)

Common Commands under Ubuntu

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.