Linux basic commands

Source: Internet
Author: User

Shell Introduction

The two concepts of command line and shell are often confusing, and on many informal occasions, these two nouns represent the same concept. In a strict sense, however, the command line refers to the interface for the user to enter commands, which in itself simply accepts input and then passes the command to the command interpreter.

The shell is essentially a program that provides a line-oriented, interoperable interface between the user and the operating system. The user enters commands at the command line, runs in the background shell to convert commands into instruction code to send to the operating system, and the shell provides many advanced features that make interaction between the user and the operating system easier and more efficient.

$ represents a normal user.

# indicates the root user is entering.

Shell Command Description:

CD//Open root directory

LS//List files and directories

CAT//Open File

  

Cat li<tab>//<tab> says press Tab to build

The shell will be auto-complete as: Cat libao.conf

Cat li<tab><tab>//<tabl> Press twice to show all the file names of Li.

  

Cat-n libao.conf//The line number can be displayed.  LS *.conf//represents the present folder at the end of all the files that are conf ls text? and * Similar wildcard characters? , but unlike * matches any length of string,?  Match only one character result is: Text1 text2 text3 text4 text5 ls text[1a]//[] is used to match all occurrences of the character enclosed in parentheses.  The result is: Text1 texta ls text[1-3] or ls text[a-c]//between which the content includes 1, 3 will also appear.  PWD//Displays the current directory.  Ls-f//By default, the directory is displayed in blue, the normal file is black, the executable file is green, the light blue indicates that the file is a link file ls-a//Displays the current directory of all files, including hidden files.  LS-AF//Show current directory All files with clear folders.  Ls-1//Can view various properties of a file. More Fstab//This more is used for reading files than cat, but is better than cat. Cat will show all the files. We also need to move the scroll bar, and more do not need him only to display information on this page, there is a previous page and next page.  Press Q to build the exit.  Head and tail//read the beginning and end of the file.  Less//The best reading tools, less and more are very similar, but feature and powerful, less improved a lot more details, and added many features.  The enhanced features are as follows. 1.  Use the cursor to scroll the screen before and after the text file (or even left or right). 2.  Browse files with line numbers or percentages as bookmarks. 3.  To achieve complex retrieval, highlighting and other operations. 4.  Keyboard operations that are compatible with commonly used word processing programs. 5.  Reading to the end of the file is the less command does not exit. 6. The information tips at the bottom of the screen are easier to control and provide more information. (not finished ....) )

Linux basic commands

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.