[Linux] Getting Started with Linux operating foundation consolidation

The following is to participate kun kun seniors Linux operating training base notes ~

First, to help the operator

(1) completion of both command

  tab filled command

  tab × 2 x retrieval command beginning

(2) help command

  Check the man page for man ls

  View info pages info ls

  ls --help view help manual

Second, the simple directory structure

(1) the overall directory structure: (from rookie tutorial)

 

See FIG head of Mind ~ https://wangzhankun.github.io/2019/10/Linux directory structure .html

(2) represents a relative path used: .. parent directory

             . Current directory

             pwd View current directory

(3) an absolute path and relative path

    Relative path ./a.txt

               ../file/a.txt

    Absolute path / home / user / Downloads /

(4) file and directory operations command

  ls displays the file name, property

  cd Change directory

  Modify touch

  

  Create a directory mkdir

  cp Copy

  mv move

  rm delete

 

  cat and display a designated one or more information files

  1 // action: once to display the entire file.
      CAT filename $

  // Role 2: Create a file from the keyboard.
      CAT $> filename
      ** can only create a new file, you can not edit existing documents **

  // Role 3: several files into one file.
      $ cat file1 file2> file

(5) compressed

tar -zcvf myfile.tar.gz ~ / Pictures compressed and packaged

extracting tar -zxvf myfile.tar.gz

<The z to j, was .tar.bz2 format>

 

<To the specified directory: -C / home / joyce>

(6) Environment Variables

env display all environment variables

echo $ variable name display an environment variable

Variable name = variable value creation

unset variable variable names deleted

(7) process

View active processes top

ps print all processes

pstree printing process relationship

kill kill the process

Third, the switching interface to login

Ctrl + Alt + F3 away from the UI interface switches to monochrome interface

exit exit

Ctrl + Alt + F1 back to the UI

Four, vim underlying operating

(1) Edit Mode

i is stopped at the position where the cursor does not move to start writing the content (frequently-used)

I first began at the cursor trekking write to

After a start to write to the current cursor line character

A cursor at the end of the start writing the content trekking

o In the line where the cursor next line starts writing the content

O on the line where the cursor row to start writing content

(2) command mode  

Press Esc to exit edit mode, enter: to enter command mode

: Wq save and exit

:! Wq forced to save and exit

: Q Force Quit!

: Set nu show line numbers

 

Guess you like

Origin www.cnblogs.com/fighterkaka22/p/11780337.html