Common ubuntu command line

Source: Internet
Author: User

Common ubuntu command line
Software Update and Installation

Source update: sudo apt-get update
Software Update and update of installed packages: sudo apt-get upgrade
Software Installation: sudo apt-get install xxx (xxx is the software to be installed)

Permission

If you do not have sufficient permissions to modify files in the root directory or paste or delete files, sudo nautilus
Obtain the highest permission to open the software or other: su

Vim operations and file operations

To open a document under home: cd/home/zw/java/code
Then use: ls
Show all files and names

Vim operations

Continue: vim readme.txt
Are you sure you want to open the document and insert it by I?

After modification, Press Esc to exit,
: Q (Exit)
: Wq (save and quit)

After exiting

The above is only the basic insert, modify, and save operations for vim.

Vim operation 2

The following command lines are some basic command line operations of vim. If you need more operations, Baidu.
: Q exit
: Q! Force exit and do not save
: W save
: Wq save and exit
: Help I insert Command help (view)
: Set number or: set nu displays the row number
: Set nonumber or: set nonu does not display the row number
Vim + n filename: Enter row n of the file to modify
Vim filename: Enter the last line of the file
U undo the previous operation
/Hello search for the hello character
: S/hello/world: Replace the hello character with world (only in the row where the cursor is located)

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.