Quit

Quit[]

terminates a Wolfram Language kernel session.

Details

  • Quit[] quits only the Wolfram Language kernel, not the front end.
  • To quit a notebook front end, choose the Quit menu item.
  • All kernel definitions are lost when the kernel session terminates.
  • If you have kept the definitions in a file or in a notebook you can always reenter them in a subsequent session.
  • Quit can be used as a shortcut for Quit[] if it is the entirety of the input expression.
  • Before terminating a kernel session, the Wolfram Language executes any delayed value that has been assigned to the global variable $Epilog. Conventionally, this attempts to read in, using Get, the package file end` that contains commands to be executed before termination.
  • On most computer systems, Quit[n] terminates the Wolfram Language kernel, passing the integer n as an exit code to the operating system.
  • On systems that support exit codes, Quit[] is equivalent to Quit[0].
  • The Wolfram Language kernel uses the following exit codes when it quits automatically:
  • 0normal exit
    1an internal error occured
    2an attempt to start the kernel via WSTP failed
    3the kernel quit from the interrupt menu
  • The Wolfram Language kernel uses exit codes between 60 and 85 when startup failed due to license restrictions. Most of these failures refer to a problem with a password entry found in $PasswordFile. Common values include:
  • 60the network license server cannot give licenses for this product
    61network license limit reached
    62invalid activation key/password combination
    63expired password
    70no password file found
    71unable to connect to network license server
    72password file empty
    73password file has empty password entry
    74password file has truncated password entry
    75network license server can only authorize older versions of the product
    78invalid activation key entered
    81the network license server instructed the kernel to terminate
    82the network license server refused to give a license
    84the network license server refused to give a license due to a configured restriction
    85single machine process limit reached
  • Exit[] is a synonym for Quit[].

Examples

Basic Examples  (1)

Quit terminates the kernel, losing any definitions that have been made:

Quit[] will terminate the kernel. Do not enter it if you have any definitions you want to keep:

The previous definition for a has been lost:

Wolfram Research (1988), Quit, Wolfram Language function, https://reference.wolfram.com/language/ref/Quit.html (updated 2020).

Text

Wolfram Research (1988), Quit, Wolfram Language function, https://reference.wolfram.com/language/ref/Quit.html (updated 2020).

CMS

Wolfram Language. 1988. "Quit." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/Quit.html.

APA

Wolfram Language. (1988). Quit. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Quit.html

BibTeX

@misc{reference.wolfram_2024_quit, author="Wolfram Research", title="{Quit}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/Quit.html}", note=[Accessed: 04-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_quit, organization={Wolfram Research}, title={Quit}, year={2020}, url={https://reference.wolfram.com/language/ref/Quit.html}, note=[Accessed: 04-October-2024 ]}