Learning Summary and Homework summary

Source: Internet
Author: User
Tags echo command

Summary of this chapter

1 User Login

2 Terminal

3 shell

4 Execute command, simple command

5 Table Completion

One user management

1 root administrator user, with unlimited permissions, General Operations Server does not use root login

2 Ordinary users, limited access, resulting in limited damage, relatively little damage


Two terminal

The user interacts with the host, uses the device,

Includes: Physical terminal, virtual Terminal simulation terminal

View current terminal TTY,

Switching terminals: CHVT 1-6,ctrl+alt 1-6 system with

Interactive interface: GUI CLI

Three shells

Definition: A shell is an interface that provides user and kernel interaction. He sends the user's command to the kernel to execute, or it can

called the command interpreter.

Displays the currently used shell echo $ (shell)

View current system All Shell,cat/etc/shells

Four-command execution

divided into internal and external commands

There are two types of commands that can be executed in the shell: An internal command, which is brought by the shell, and an enable command in the form of a command that enables or disables the internal command external command: there is a corresponding executable program file under a file system path of the current system; Which,whereis difference when The command used before is internal or external: # Type command hash: Search for external command path result cache to KV (Key-value) store hash display hash cache hash–r Clear Cache

Five, command format


COMMAND [OPTIONS ...] [ARGUMENTS ...] Options: One or some of the features used to enable or disable commands; short options:-C, for example:-L,-H long option:--word, for example:--all,--human-readable parameter: The object of the command, such as file name, user name, etc.

Date Use method


Date-Displays dates and times two clocks of Linux: System clock: The operating frequency of the CPU by the Linux kernel; hardware clock: Motherboard hwclock,clock: Display hardware clock-s,--hctosys hardware clock, calibration system clock-W,-- SYSTOHC to calibrate the hardware clock, whichever is the system clock

Cal-Show Calendar nano– text editing


Screen command: Open the new screen:# screen to exit and close screen:# exit to peel the current screen:


Ctrl+a,d Show all open screen:screen-ls restore a screenscreen-r [SESSION]



echo Command function: Display character syntax: echo [-nee][string] Description: Echo will enter the string


Sent to standard output. The output strings are separated by white space characters, and at the end, add the line number echo "$VAR _name":

Variable is replaced, double quote table weak reference echo ' $VAR _name ': variable is not replaced, strong reference $echo–e "Enter the

File name: \c "Echo needs to use the-e parameter to print the escape character.


echo Command options:-N does not wrap characters at the end of the line

-E If the following character appears in the string, it is handled in particular, not as a general text output:

\a issued a warning sound;

\b Backspace key

\c finally not add the line break symbol;

\ n Wraps and the cursor moves to the beginning of the line;

\ r The cursor moves to the beginning of the line, but does not wrap;

\ t inserts the tab;\\ insert \ Character; \0nnn inserts the ASCII character represented by the NNN (octal)

Echo-e "\033[43;31mred color\033[0m"



Save the command history you entered. You can use it to repeatedly execute commands when you log in to the shell and read the command history file

The command ~/.bash_history logged into the shell will only be recorded in the cache, and these commands will


"Append" to the command history file when the user exits





Use Help


Internal command: #help command #man Bash

External command: (1) # command--help# command-h

(2) User manual (Manual) # Man COMMAND


(3) Information page # info COMMAND


(4) Help documentation for the program itself Readmeinstallchangelog (


(5) Official Website of the program: documentation

Learning Summary and Homework summary

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.