Linux Common commands

Source: Internet
Author: User


a the format of the Linux command

1 , Commands [ options ] [ parameters ]

ls List Display the contents of the directory

① Command name: ls

Command English Original: List

Command path: /bin/ls

Execute Permissions: All Users

function Description: Display directory file ② ls name Direct Enter to display the contents of the directory

ls-l Long format display ( the thumbnail option with a minus sign, the full option with two minus )

-RW-------1 root root 1190 08-10 23:37 anaconda-ks.cfg

First item: Permission Bits

the second item: 1 Reference Count

the third item: Root owner

Item Fourth: Root Genus Group

Item Fifth: Size

Item Sixth Last modification Time

Item Seventh file name

ls-a Show All files (contain hidden files)

Ls-al

ls-h file size is displayed as a common size unit B KB MB

ls-d display the directory itself, not the child files inside

ls-l file name

Prompt:

[email protected]localhost src]#

[Current login user @ hostname current directory]#

# Super User

$ Normal User

Current directory: ~ User Home Directory

Administrator /root

Normal User /home/User Name

two Directory Operations Command

1 ) CD change the directory in which

① Command name: CD

Command English Original: Change directory

Command path: Shell built-in commands

Execute permissions: All users ② cd/usr/local/src

relative path: Look for the current directory. Be sure to first determine the current directory. Root] #cd. /USR/LOCAL/SRC

Absolute Path: cd/usr/local/src starting from the root directory, first-level recursive lookups. In any directory, access to the specified location cd ~ Enter the current user's home directory /root/home/aa/

CD CD- go to last directory

CD.. go to the top level directory CD. go to current directory

2) pwd Show current directory

Command name: pwd

Command English original intention : Print working directory

Command path: /bin/pwd

Execute Permissions: All Users

3 ) Linux Common Directories

/ root directory

/bin command to save the directory (commands that ordinary users can read)

/ Boot start directory, start related files

/ Dev device File Save directory

/ etc configuration File Save Directory

home directory for normal users

/lib System Library Save directory

/mnt System mount Directory

/media Mount Directory

/root home directory for super users

/ tmp Temp directory

/sbin command to save directory (a directory that superuser can use)

/proc write directly to the memory

/sys

/ usr system software Resources Directory

/usr/bin/ system command (normal user)

/usr/sbin/ system command (super User)

/ var system-related document content

/var/log/ System log Location

/var/spool/mail/ system default mailbox Location

/var/lib/mysql/ default installed MySQL library files directory

4 ) Create a directory

mkdir Directory name

Command name: mkdir

Command English Original: Make directories

Command path: /bin/mkdir

Execute Permissions: All Users

mkdir-p 11/22/33/44 Recursive build directory

5 ) Delete directory

rmdir Catalogue only empty directories can be deleted

Command name: rmdir

Command English Original: Remove Empty Directories

Command path: /bin/rmdir

Execute Permissions: All Users

RM file name Deleting Files

RM-RF Catalogue Delete files and directories

- R recursive, deleting directories

- F forcing

6 ) Tree Directory name Displays the directory tree for all content under the specified directory

Command name: Tree

Command path: /usr/bin/tree

Execute Permissions: All Users

This article from "Wind Fan" blog, reproduced please contact the author!

Linux 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.