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.

6,205 total views, 9 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, 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
%d bloggers like this:
Read more:
Reloading a vmx File Without Remove That From vCenter Inevntory

I'm working on a solution that it needs to edit something on virtual machine vmx file. But as you know,...

Close