The core combat system commands Chapter One Introduction to the Linux command line

Chapter One Introduction to the Linux command line

1.1 Linux Command-Line Overview

 1.1.1 Linux command line to open and exit

   On: login account password to enter the system

   Exit: exit / logout shortcut: Ctrl + d

 1.1.2 Linux command line prompt introduction

(1) controlled by the prompt PS1 environment variable. Example code:

  [root@centos102 ~]# set | grep PS1

  PS1 = '[\ u @ \ h \ W] \ $'

       Here PS1 = '[\ u @ \ h \ W] \ $', can be configured by global file / etc / bashrc or / etc / profile adjustment and on-demand configuration.

 1.1.3 Linux command line frequently used shortcuts

hot key  Function (* commonly used)
The most commonly used shortcuts
tab   Commands or path completion bond, linux most commonly used shortcuts *
Move the cursor shortcuts
Ctrl+a  Move the cursor to the command line head *
Ctrl+e Move the cursor to the end of the command line *
Ctrl+f The cursor moves one character (corresponding to the right direction key)
Ctrl+b The cursor one character to the left (corresponding to the left direction key)
Cut, paste, clear shortcuts
Ctrl+Insert Copy the contents of the command line * (xshell can adjust, such as Ctrl + C)
Shirt+Insert Paste command line contents * (xshell can adjust, such as Ctrl + P)
Ctrl+k Cut (Delete) the cursor to the end of the line *
Ctrl+u Cut (delete) the cursor to the beginning of the line *
Ctrl+w Cut (delete) a word before the cursor
Ctrl+y   Paste Ctrl + k / Ctrl + u / Ctrl + w text cut
Ctrl+c Terminal interrupt task is being executed or delete the entire line * (xshell can adjust, such as Ctrl + x)
Ctrl+h Delete at the cursor before a character (the equivalent of the backspace key)
Repeat command shortcuts
Ctrl+d Exit the current shell command line *
Ctrl+r Search command used to exercise command history records *
Ctrl+g Exit from the execution history search Ctrl + r in command mode
Control shortcuts
Ctrl+l Clear screen all content, and start a new line at the top of the screen, is equivalent to the clear command *
Ctrl+s Lock the terminal so that it can not enter content
Ctrl+q   Ctrl + s to perform unlock the lock status
Ctrl+z Suspended from their duties in the operation of the terminal *
! The beginning of the number shortcuts
!! Executing a command
! pw Execute the most recent command beginning with pw *
!pw:p Print only the beginning of the ps command recently, but does not perform
!on one The execution history list of commands first num (digital) command *
!$ The last parameter on a command, corresponding to Esc +. (Point)
ESC-related
Esc+. Get the last part of a command (separated by spaces) *
Esc+b Move to the beginning of the current word
Esc+f Moves to the end of the current word

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1.2 In order to view the Linux command line help

 

Guess you like

Origin www.cnblogs.com/flytor/p/11368105.html