How to Exit or Quit from Spark Shell & PySpark?

  • Post author:

Both spark-shell and pyspark have different ways to exit or quit from a shell prompt. For spark-shell use :quit and from pyspark use quit() to exit from the shell. Alternatively, both also support Ctrl+z to exit.

1. Exit or Quit from Spark Shell

Like any other shell, spark-shell also provides a way to exit from the shell. When you are in shell type :quit to come out of the shell prompt.

spark shell exit

Alternatively, you can also use Ctrl+z to exit from the shell.

2. Exit or Quite from PySpark Shell

Similarly to exit or quit from pyspark shell, you can use either quit() or exit() from shell prompt. Let’s launch the shell, run some examples and finally exit from it.

pyspark shell exit

Alternatively, you can also try Ctrl+z to exit from the pyspark shell.

Conclusion

In this quick article, you have learned how to exit or quit from the Spark and pyspark shell. To quit from the spark-shell use :quit and to quit from the pyspark shell use quit()

Happy Learning !!

quit spark shell pyspark

NNK

SparkByExamples.com is a Big Data and Spark examples community page, all examples are simple and easy to understand and well tested in our development environment Read more ..

Leave a Reply

You are currently viewing How to Exit or Quit from Spark Shell & PySpark?