Differences between the vi and nano commands during Ubuntu text editing (nano is recommended)

Source: Internet
Author: User

Differences between the vi and nano commands during Ubuntu text editing (nano is recommended)

Vi is a very common full-screen file editor in the Unix world. It can be said that almost any Unix machine will provide this software, just like Windows notepad.

Type vi/etc/hosts

Go to the vi interface and move the cursor to the end of the file. Press ESC to run the command mode, enter A, and enter the host you want to configure in A new line, for example, 192.168.0.192 photo.dxxf.net.

Press ESC to run the command. Enter wq (Note:) to save and exit.

2. Run the nano command to modify:

Nano is a compact, free, and friendly editor that has nano commands in most linux systems. I think nano is much simpler than vi but I am not familiar with linux:

Edit the file directly after it is opened. The command is as follows:

Sudo nano/etc/hosts

Press ctrl + x to exit, Press y to save, and press ENTER

Related Article

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.