看到有人问scala的退出命令是什么,不由想起自己刚学习scala的时候,常常因为找不到退出命令,只能按ctrl+z来退出,感觉很尴尬,当时网上没有这方面的资料(可能是太基础了吧~害羞~)。于是乎就找了官方文档,找到了解决办法,下面分享出来给同样需要的朋友一个参考:

[hadoop@master conf]$ scala

Welcome to Scala 2.11.8 (Java HotSpot(TM) Client VM, Java 1.8.0_40).
Type in expressions for evaluation. Or try :help.

scala> :help
All commands can be abbreviated, e.g., :he instead of :help.
:edit <id>|<line>        edit history
:help [command]          print this summary or command-specific help
:history [num]           show the history (optional num is commands to show)
:h? <string>             search the history
:imports [name name ...] show import history, identifying sources of names
:implicits [-v]          show the implicits in scope
:javap <path|class>      disassemble a file or class name
:line <id>|<line>        place line(s) at the end of history
:load <path>             interpret lines in a file
:paste [-raw] [path]     enter paste mode or paste a file
:power                   enable power user mode
:quit                    exit the interpreter
:replay [options]        reset the repl and replay all previous commands
:require <path>          add a jar to the classpath
:reset [options]         reset the repl to its initial state, forgetting all session entries
:save <path>             save replayable session to a file
:sh <command line>       run a shell command (result is implicitly => List[String])
:settings <options>      update compiler options, if possible; see reset
:silent                  disable/enable automatic printing of results
:type [-v] <expr>        display the type of an expression without evaluating it
:kind [-v] <expr>        display the kind of expression's type
:warnings                show the suppressed warnings from the most recent line which had any

scala> :quit

[hadoop@master conf]$

[hadoop@master conf]$ spark-shell --master local
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel).
16/11/01 04:13:51 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
16/11/01 04:13:51 WARN SparkConf: Detected deprecated memory fraction settings: [spark.storage.memoryFraction]. As of Spark 1.6, execution and storage memory management are unified. All memory fractions used in the old model are now deprecated and no longer read. If you wish to use the old memory management, you may explicitly enable `spark.memory.useLegacyMode` (not recommended).
16/11/01 04:13:53 WARN SparkContext: Use an existing SparkContext, some configuration may not take effect.
Spark context Web UI available at http://192.168.184.130:4040
Spark context available as 'sc' (master = local, app id = local-1477998832603).
Spark session available as 'spark'.
Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /___/ .__/\_,_/_/ /_/\_\   version 2.0.0
      /_/
         
Using Scala version 2.11.8 (Java HotSpot(TM) Client VM, Java 1.8.0_40)
Type in expressions to have them evaluated.
Type :help for more information.

scala> :help
All commands can be abbreviated, e.g., :he instead of :help.
:edit <id>|<line>        edit history
:help [command]          print this summary or command-specific help
:history [num]           show the history (optional num is commands to show)
:h? <string>             search the history
:imports [name name ...] show import history, identifying sources of names
:implicits [-v]          show the implicits in scope
:javap <path|class>      disassemble a file or class name
:line <id>|<line>        place line(s) at the end of history
:load <path>             interpret lines in a file
:paste [-raw] [path]     enter paste mode or paste a file
:power                   enable power user mode
:quit                    exit the interpreter
:replay [options]        reset the repl and replay all previous commands
:require <path>          add a jar to the classpath
:reset [options]         reset the repl to its initial state, forgetting all session entries
:save <path>             save replayable session to a file
:sh <command line>       run a shell command (result is implicitly => List[String])
:settings <options>      update compiler options, if possible; see reset
:silent                  disable/enable automatic printing of results
:type [-v] <expr>        display the type of an expression without evaluating it
:kind [-v] <expr>        display the kind of expression's type
:warnings                show the suppressed warnings from the most recent line which had any

scala> :quit
[hadoop@master conf]$

如何退出SCALA命令界面相关推荐

  1. 如何退出scala命令界面和scala常用命令

    对于初学者来说,有些东西要一点点来,尤其是基础,不能着急,无论你是小白,还是大白,有一些基础也好,多看基础命令对你来说都会有帮助的 一:常用命令 scala> :help All command ...

  2. 怎么退出python命令界面_怎么退出python命令行

    因为Python是跨平台的,它可以运行在Windows.Mac和各种Linux/Unix系统上.在Windows上写Python程序,放到Linux上也是能够运行的. 要开始学习Python编程,首先 ...

  3. 熟悉scala命令,scala语言运行超级素数和猴子大王

    实验目的 在Linux操作系统中安装Scala 输入"scala"命令,熟悉地运行Scala解释器 scala语言运行超级素数和猴子大王 实验仪器 Virtualbox管理器 实验 ...

  4. centos7标准版命令界面和图形界面相互切换

    1.root登陆终端 2.输入命令 vi /etc/inittab ,查看两种界面的启动模式: 3.退出vi模式,,输入命令systemctl get-default 查看当前系统启动模式:我的是命令 ...

  5. centos7打开图形界面命令_centos7标准版(DVD)命令界面和图形界面相互切换

    1.root登陆终端 2.输入命令 vi /etc/inittab ,查看两种界面的启动模式: vi /etc/inittab 3.退出vi模式,,输入命令systemctl get-default ...

  6. Linux下怎么退出telnet命令行

    Linux下怎么退出telnet命令行 经常要用到telnet来测试端口是否正常开放. 但是在telnet进入某个端口后无法退出,没办法,为了继续测试只好关掉这个dos(或其他)窗口,重新打开一个. ...

  7. Python学子之如何退出python 命令行

    python命令行是新手学习python过程中必须要学的一个工具,下面我们来看一下怎么退出python命令行. 工具/原料 python2.7 方法/步骤 1.我们这里使用的是python3.6版本, ...

  8. centos退出mysql命令_Centos 进入与退出数据库命令,其他命令大全

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 一.进入: # mysql -uroot -p Enter password: 二.退出: 在mysql>提示符下输入quit可以随时退出交互操作界 ...

  9. Linux如何从图形界面切换到命令界面

    1.手工切换:在图形界面中找一个可以输入命令的地方(RedHat9中默认是按alt+F2,或者从菜单:系统工具→终端打开) 输入init 3 回车(注意init后面有一个空格),等一会就进入了命令界面 ...

最新文章

  1. 跨平台代码换行符的问题处理
  2. [Erlang33]使用recon从网页查看Erlang运行状态
  3. Spring Boot - 自动配置实现原理
  4. 42 | 案例篇:如何优化 NAT 性能?(下)
  5. 集合的体系结构 0119
  6. 1190: [HNOI2007]梦幻岛宝珠 - BZOJ
  7. DevOps 转型,只有工具是远远不够的!
  8. 关于SVN常用命令之export
  9. 翻译:protocol的高阶用法,在Swift 5中使用协议protocol构建自定义集合Collection
  10. Android SDK下载失败解决
  11. 关于echarts图表下载
  12. VirtualBox虚拟机安装Win10企业版
  13. Revel模板引擎Template基本语法
  14. 【科学文献计量】知识单元的频次统计与分布(简单阅览和完整频次统计)
  15. C++实现视频格式转换PC客户端工具(支持多任务,暂停,断点续转,删除等基本功能)
  16. 云主机创建网络失败:Unable to create the network. No tenant network is available for allocation.
  17. Java中instanceof关键字的用法
  18. 红黑树详解及其模板类实现
  19. 【调剂】上海航天802所2023年研究生调剂开始啦!
  20. mysql权限和使用注意事项及mysql 数据类型详解和innodb,myisam区别

热门文章

  1. 服务器开发macbook综述
  2. 高分七号(GF-7)
  3. JSP 页面访问用户验证
  4. 如何将访问的接口去掉token验证
  5. 信息学奥赛C++编程:鸡尾酒疗法
  6. sublime text3 下载和汉化
  7. 基于BootStrap仿淘宝星星商品评价案例
  8. [含lw+源码等]微信小程序点餐|外卖|餐饮系统+后台管理系统[包运行成功]
  9. confluence 配置
  10. ibm aix 抓包命令_在IBM AIX上模拟丢弃的TCP / IP数据包