How to Exit From Scala Shell
Mohammad Irfan
Feb 02, 2024
Scala shell is a CLI interpreter to execute and write REPL scripts.
This tutorial will discuss how to exit or stop the Scala shell with some commands.
Use Commands to Exit or Stop the Scala Shell
If you are working with Scala shell and want to stop it without closing the current terminal window, then use any of these commands:
- For Linux, use the Ctrl+d+Enter keys combination.
- For Windows, use theCtrl+z+Enter keys combination.
:q
:quit
- Ctrl+c
Rest commands can also be used for an exit based on the scenario, such as the :q
or :quit
is a Linux-specific command to exit the editor and works fine for Scala.
See the screenshot below where we used the :q
and :quit
to exit the scala shell.