Fifth day of Learning Linux

Source: Internet
Author: User

1.VIM Editor

3 modes: Command model, Insert model, last line model

Installing Vim:sudo apt-get Install vim

If you are prompted for an error, enter: sudo apt-get install vim--fix-missing

2. Using Vim

Vim Abc.txt Create a abc.txt document into the current directory and enter the command Model

Press Ctrl+i to enter the Insert Model, which can be edited at this time

Key ECS enters command Model again

In the downstream input: Wq Save and exit

Vim +3 abc.txt cursor directly to the third line

Vim +/hujun123qwe abc.txt Cursor will find the beginning of the first appearance of Hujun123qwe

If there are multiple files in the current directory that can be switched directly within VIM, Command model input: n file_name

3. Common commands

:! Enforcement, such as: q! Force exit

: LS lists all open files

: 15 cursor jumps to 15 lines

/xxx to search before

? XXX Search Backwards

DF Disk Management

The file size of the DU statistics disk

Cat/etc/group Viewing user groups

4. User group Basic Management commands

Groupadd grp_name creating Grp_name user groups

Groupmod-n new_grp_name grp_name Modify user group name

GROUPMOD-G 755 grp_name Modify User group number

Groupadd-g 756 grp_name Add user group collocated number

Groupdel Grp_name Delete

Useradd-g grp_name usr_name Add a user to a specified user group

Fifth day of Learning Linux

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.