Quantcast
Channel: How To's | Everything Tech - Appuals.com
Viewing all articles
Browse latest Browse all 4542

How to Use vi Without Installing it

$
0
0

There’s no editor that’s more portable than vi, regardless of the controversy that it might have created over the years. While it’s a bit old fashioned, it’s extremely useful for those who understand all of the commands for it, and it’s also a vital tool if you’re ever repairing a system that won’t start for whatever reason.

Many users uninstall the more weighty vim or other clone packages because they don’t use them. Most embedded systems also lack support for these designs, which means that if you happened to have the misfortune of working with a tablet or netbook that only starts a CLI interface because of a problem with XFree that you might not have the tool you need to get the system back up. There’s a pinch trick you can try that might get you a vi console anyway.

Method 1: Using vi Even if it’s Not Installed

Assume you had wanted to use vi simply by choice. If you’re inside of a graphical interface, then you need to open up a graphical terminal by holding down CTRL and ALT while pushing T. You could also theoretically get to a virtual console by holding down CTRL and ALT while pressing function keys F1-F6.

Type busybox vi at the command line and press enter. You should be inside of a vi screen even if you don’t have it installed. Press : and type q to exit. You can also use this trick to read a file in vi by typing busybox vi FILENAME. For instance if you were in your HOME directory and wanted to edit your prompt issue this command:

busybox vi .bashrc

Exit by pressing : releasing it and then pressing q and enter.

busybox-vi

Method 2: Using Busybox on Damaged Systems

If you’re given an emergency CLI because of some sort of problem starting and want to edit a file from it, then try regular vi first. If this doesn’t work, then just issue the command as above:

busybox vi FILENAME

Even in a crippled situation this should work.

The post How to Use vi Without Installing it appeared first on Appuals.com.


Viewing all articles
Browse latest Browse all 4542

Trending Articles