How to run a vi script command on Linux?

To run a vi script command on Linux, follow these steps.

  1. Open the terminal.
  2. view file name
  3. Press the “i” key in the vi editor to enter insert mode, then type in your script commands.
  4. Press the Esc key to exit insert mode.
  5. Please save and exit the program by typing “:wq”.
  6. Change the file name to be executable.
  7. run the file

These steps will help you to edit and run vi script commands.

bannerAds