The Tech Edvocate

Top Menu

  • Advertisement
  • Apps
  • Home Page
  • Home Page Five (No Sidebar)
  • Home Page Four
  • Home Page Three
  • Home Page Two
  • Home Tech2
  • Icons [No Sidebar]
  • Left Sidbear Page
  • Lynch Educational Consulting
  • My Account
  • My Speaking Page
  • Newsletter Sign Up Confirmation
  • Newsletter Unsubscription
  • Our Brands
  • Page Example
  • Privacy Policy
  • Protected Content
  • Register
  • Request a Product Review
  • Shop
  • Shortcodes Examples
  • Signup
  • Start Here
    • Governance
    • Careers
    • Contact Us
  • Terms and Conditions
  • The Edvocate
  • The Tech Edvocate Product Guide
  • Topics
  • Write For Us
  • Advertise

Main Menu

  • Start Here
    • Our Brands
    • Governance
      • Lynch Educational Consulting, LLC.
      • Dr. Lynch’s Personal Website
      • Careers
    • Write For Us
    • The Tech Edvocate Product Guide
    • Contact Us
    • Books
    • Edupedia
    • Post a Job
    • The Edvocate Podcast
    • Terms and Conditions
    • Privacy Policy
  • Topics
    • Assistive Technology
    • Child Development Tech
    • Early Childhood & K-12 EdTech
    • EdTech Futures
    • EdTech News
    • EdTech Policy & Reform
    • EdTech Startups & Businesses
    • Higher Education EdTech
    • Online Learning & eLearning
    • Parent & Family Tech
    • Personalized Learning
    • Product Reviews
  • Advertise
  • Tech Edvocate Awards
  • The Edvocate
  • Pedagogue
  • School Ratings

logo

The Tech Edvocate

  • Start Here
    • Our Brands
    • Governance
      • Lynch Educational Consulting, LLC.
      • Dr. Lynch’s Personal Website
        • My Speaking Page
      • Careers
    • Write For Us
    • The Tech Edvocate Product Guide
    • Contact Us
    • Books
    • Edupedia
    • Post a Job
    • The Edvocate Podcast
    • Terms and Conditions
    • Privacy Policy
  • Topics
    • Assistive Technology
    • Child Development Tech
    • Early Childhood & K-12 EdTech
    • EdTech Futures
    • EdTech News
    • EdTech Policy & Reform
    • EdTech Startups & Businesses
    • Higher Education EdTech
    • Online Learning & eLearning
    • Parent & Family Tech
    • Personalized Learning
    • Product Reviews
  • Advertise
  • Tech Edvocate Awards
  • The Edvocate
  • Pedagogue
  • School Ratings
  • The Brutal Truth: How Microsoft Buyouts Could Gut Your Favorite Xbox Games

  • The Brutal Truth About 2026 Short-Term Rental Regulations: What Every Investor Needs to Know

  • Germany’s Bold Move: Why This Fusion Deal Could Redefine Global Energy

  • A race to patch vulnerabilities exposed by AI

  • The Staggering Reason EV Buyers Are Hitting the Brakes (It’s Not What You Think)

  • A Disturbing OpenAI Lawsuit: Did an AI Chatbot Cause a Tragic Death?

  • The AI Job Apocalypse: Are Companies Hiding The Real Reason For Mass Layoffs?

  • One Crucial Factor Could Decimate Your US Auto Insurance Rates in 2026

  • Unbelievable: Meta Hit With $25 Billion Fine — Is Your Health Data Next?

  • 10 Crucial AI Literacy Courses Every Parent Needs Now

Digital & Mobile Technology
Home›Digital & Mobile Technology›Using Vi? Here’s How to Open a File Then Save and Quit \

Using Vi? Here’s How to Open a File Then Save and Quit \

By Matthew Lynch
September 8, 2023
0
Spread the love

As a beginner in the world of programming, understanding and using a command-line text editor such as Vi can be daunting. However, Vi is highly customizable and lightweight, which makes it highly efficient for editing and creating files in a variety of computer systems. Here’s how to open a file then save and quit using Vi:

Opening a File in Vi

  1. Launch your terminal and type “vi ” followed by the name of the file you wish to open.

For example, if you want to open a file called “example.txt,” type the following command into your terminal:

“`

vi example.txt

“`

  1. Once you’ve opened your file, you can start editing. In Vi, you are in command mode by default to move around the screen or change some of Vi’s preferences. Press “i” to enter insert mode, where you can start typing or pasting in text.
  2. After you’ve made any changes, you need to save the file to keep your changes.

Saving the File with Vi

  1. Press the “Esc” button to exit insert mode and return to command mode.
  2. Type “:w” to save your changes to the file.

If you were to forget to save your file before exiting Vi, your changes would be lost. However, if you prefer to automate the save process, you can use the following command instead:

“`

:wq!

“`

This saves the file changes and exits Vi simultaneously.

Quitting Vi

  1. Lastly, to quit Vi, you can use the “:q” command.

However, this only works if you haven’t made any changes to the file. If you’ve made any changes and try to Quit, Vi will warn you “E37: No write since last change (add ! to override)”

  1. If you did make any changes to the file, you need to save them first using the “:w” command, followed by quitting using “:q.”
  2. In the case of making changes to the file and saving, you can combine the two commands to “:wq” or “:wq!” to save and quit the file all at once.
Previous Article

What Is the Singularity and When Will ...

Next Article

How to Validate a URL Using Regular ...

Matthew Lynch

Related articles More from author

  • Digital & Mobile Technology

    How do I use format painting in Gmail?

    July 31, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    How to Hide Your Android Apps from Snooping Eyes

    April 26, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    How to Remove Bing From Chrome and Reset the Default Search Engine

    August 3, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    How to Upload Your Music to SoundCloud

    August 3, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    Best Free Ancestry Sites to Trace Your Genealogy

    June 23, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    What Is Gigabit Ethernet?

    June 8, 2023
    By Matthew Lynch

Search

Login & Registration

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Newsletter

Signup for The Tech Edvocate Newsletter and have the latest in EdTech news and opinion delivered to your email address!

About Us

Since technology is not going anywhere and does more good than harm, adapting is the best course of action. That is where The Tech Edvocate comes in. We plan to cover the PreK-12 and Higher Education EdTech sectors and provide our readers with the latest news and opinion on the subject. From time to time, I will invite other voices to weigh in on important issues in EdTech. We hope to provide a well-rounded, multi-faceted look at the past, present, the future of EdTech in the US and internationally.

We started this journey back in June 2016, and we plan to continue it for many more years to come. I hope that you will join us in this discussion of the past, present and future of EdTech and lend your own insight to the issues that are discussed.

Newsletter

Signup for The Tech Edvocate Newsletter and have the latest in EdTech news and opinion delivered to your email address!

Contact Us

The Tech Edvocate
910 Goddin Street
Richmond, VA 23231
(601) 630-5238
[email protected]

Copyright © 2026 Matthew Lynch. All rights reserved.