Davoud Teimouri

Virtualization & Datacenter

[How To]: Access to Shell via VI or VIM Editor

Shell Access via VI or VIM


Why do you need to access shell via VI or VIM?

A: sometimes, you have to copy result of a commands and paste those results to editor. For example, you are configuring SCSI devices as DM-Multipath devices, you have to run some commands like “multipath -l” for see “WWID” of specific device and add the “WWID” to “multipath.conf”.

As simple solution, you can run another ssh session and run the command on this session, then copy and paste the result. But I think, there is another good way to do it.

You can access to shell via VI or VIM editor and do your job!

But how to?

How to Access Shell via VI or VIM?


Run VI or VIM command to open the editors and start to edit your file. For accessing to shell, you must run the below command within VI or VIM:

Or this command:

Then you will access to shell and the editor is still open.

The shell is opened for your temporary, so you must have access to editor again. Press Ctrl+D or type “exit” and hit Enter for return back to the editor.

7,126 total views, 6 views today

[How To]: Access to Shell via VI or VIM Editor
5 (100%) 2 Votes

Davoud Teimouri is as a professional blogger, vExpert 2015/2016/2017/2018, VCA, MCITP. This blog is started with simple posts and now, it has large following readers.

Leave a Reply

Your email address will not be published. Required fields are marked *

Teimouri.net © 2012 Frontier Theme
Read previous post:
Linux Distribution
[How To]: Linux tac Command – Usage and Examples

Linux tac Command tac command practically is reverse version of cat command. It means, any result in cat command will...

Close