← All commands
Topic hub Terminal & Shell Scripting
Windows Linux Terminal & Shell Scripting Expanded guide Terminal

Windows pause equivalent in Linux

Halts a script and waits for the user to press a key before continuing. Used frequently in batch files.

Windows pause
→
Linux equivalents
Debian/Ubuntu same command
read -p
Fedora same command
read -p
Arch same command
read -p

Overview

What this command does

On Windows, "pause" is used to pause a script and wait for keypress. On Linux, the closest practical mapping shown here is "read -p". Halts a script and waits for the user to press a key before continuing. Used frequently in batch files. This reference is grouped under Terminal & Shell Scripting → Terminal.

Migration tip: Linux has no built-in <code>pause</code> command. Use <code>read</code> in scripts to wait for input. For a single keypress without needing Enter, use <code>read -n 1</code>.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows pause maps to read -p for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.

Portable across the compared distros

The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.

Practical tasks

Common use cases

Pause a script and wait for keypress

Halts a script and waits for the user to press a key before continuing. Used frequently in batch files.

read -p 'Press Enter...'

Wait for Enter key

read -n 1 -s

Wait for any single key (silent)

read -t 10

Auto-continue after 10 seconds

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

read -p 'Press Enter to continue...'
read -n 1 -s -p 'Press any key...'
echo
read -t 10 -p 'Auto-continuing in 10s... ' || true

Walkthrough

Examples with explanations

# Windows: pause
read -p 'Press Enter to continue...'

# Wait for any key (no Enter needed):
read -n 1 -s -p 'Press any key...'
echo  # newline after

# Auto-continue after timeout:
read -t 10 -p 'Auto-continuing in 10s... ' || true

Reference

Common options and variations

Command or optionUse
read -p 'Press Enter...'Wait for Enter key
read -n 1 -sWait for any single key (silent)
read -t 10Auto-continue after 10 seconds

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "read -p" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu same command read -p Same command on this distribution.
Fedora same command read -p Same command on this distribution.
Arch same command read -p Same command on this distribution.

Keep learning

Related Terminal & Shell Scripting commands