Reposted on the personal official account: MobaXterm/Xshell quick command macro (macro) configuration)
content
When using MobaXterm
or Xshell
connecting to a remote server, add commonly used command macros (Macro) to execute with one click, which can improve efficiency and save time.
Instructions:
MobaXterm:
-
Left menu bar ->
Macros
->Record new macro
; -
Click
Record new macro
to start recording the macro; -
Enter the command you need in the terminal interface on the right;
-
Click again
Stop recording macro
to end recording; -
The last recorded macro will be saved
Saved macros
in the list; -
When you need to execute,
Saved macros
you only need to click the macro saved in the list.
If the currently installed version does not support direct recording of macros in the following situations, you can directly import the attached file with Macros
the right mouse button , and then edit and change commonly used commands according to your needs.Import macro
- By default, there are up to 4 macros for this action. What if you want a macro (macro instruction)? The operation is as follows:
just select the existingMarco
left buttonDuplicate "xxx"
and there will be one more, and then command and edit the desired command.
Xshell:
-
Tools -> Quick Command Set.
-
You can create, edit, add, and modify command sets.
-
The following is to save the command set just entered, which can be edited and added, and click to execute.