Linux learning record. 4. Common commands

Source: Internet
Author: User

help command--help get help with ' command ' commands

Directories and files

Cd/home into ' home ' directory

Cd.. Return to the top level directory

CD into your personal directory

CD-Back to top level directory

PWD Displays the current path

LS View files and directories in the directory

Ls-l displaying details of files and directories

Ls-a display contains hidden files

mkdir Dir1 created with a ' dir1 ' directory

Mkdir-p DIR1/DIR2 Build a multi-level directory, DIR1/DIR2

Rmkdir [-p] dir Delete empty directory ' dir ',-p together with the upper empty directory also deleted

Touch [-ACDMT] hello.c Create a ' hello.c ' empty file,-a only modified time,-C only modify time if not present the new file is not created

Cat [Options] hello.c display the file hello.c content from the first line,-a equals-vet,-n display line number,-v lists invisible characters,-e line break $ display,-t [tab] to ^i display

TAC [Options] hello.c starting from the last line

NL [Options] HELLO.C displays the contents of the file hello.c,-B

RM hello.c Delete file ' hello.c '

RM [Options] dir Delete folder dir,-r down recursion,-f ignore hint

CP [options] source destination copy files or directories

MV [options] source destination moving files or directories

chmod changing file permissions

Tar Compress package tar.gz using command TAR-XZVF filename to extract to current directory

System

Date Displays dates

Cal Display Calendar

Sync synchronized memory to hard drive

Shutdown shut down the machine

Poweroff shut down the machine

Halt shut down the machine

Reboot restart

Exit quit Terminal

Kill shutdown Process

Software tools

Apt-get install PackageName Installing/updating a deb package

Apt-get Update Package

Apt-get Upgrade Upgrade Software

Apt-cache Search Package

Snap install PackageName Installing a snap package

Snap Refresh Update

Linux learning record. 4. Common commands

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.