# 作业控制模式

The Job Control Mode (JCL mode) is the menu you get when you press ˆG in the Erlang shell. From that menu, there is an option allowing you to connect to a remote shell:

作业控制模式(JCLmode)是当你在Erlang shell中按下Ctrl+G时出现在菜单。里面有一个选项允许人连接到一个远程节点上：

--------------------------------------------------------------------------------------
([email protected])1>
User switch command
--> h
c [nn] - connect to job
i [nn] - interrupt job
k [nn] - kill job
j - list all jobs
s [shell] - start local shell
r [node [shell]] - start remote shell
q - quit erlang
? | h - this message
--> r ’[email protected]’
--> c
Eshell Vx.x.x (abort with ^G)
([email protected])1>
--------------------------------------------------------------------------------------

When that happens, the local shell runs all the line editing and job management locally, but the evaluation is actually done remotely. All output coming from said remote evaluation will be forwarded to the local shell.
To quit the shell, go back in the JCL mode with ˆG. This job management is, as I said, done locally, and it is thus safe to quit with ˆG q:

当完成了上面操作后，那些你看上去在本地shell完成输入行或作业管理(job management)，实际上是远程节点上完成的。所以远程节点的运行结果也在本地节点上显示。
为了退出shell(远程节点的shell)你可以使用Ctrl+G回来JCL模式，然后输入q退出本地节点(不会影响远程节点)。 --------------------------------------------------------------------------------------
([email protected])1>
User switch command
--> q
--------------------------------------------------------------------------------------

You may choose to start the initial shell in hidden mode (with the argument -hidden) to avoid connecting to an entire cluster automatically.

你可以使用hidden模式(使用参数：-hidden)开启一个新的shell，这样就可以防止此shell自动连接到整个集群节点上了。