How Do You Stop a Unix Script?
Contents

If it’s running in the foreground, Ctrl-C (Control C) should stop it. Read the documentation on the ps command and familiarize yourself with its options. It’s a very useful command.

How do I stop a script in Linux?

To stop script, type exit and press [Enter]. If the script can not write to the named log file then it shows an error.

How do you stop a script from running?

You can terminate that script by pressing Ctrl+C from terminal where you started this script. Of course this script must run in foreground so you are able to stop it by Ctrl+C.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest