Back to the command reference

true

ShellAdvanced In simulator In real Linux

Do nothing, successfully (exit code 0)

Name: true

You can practise it right away in the simulator, and use it in real Linux mode too.

Description

true does nothing and exits with status 0 (success). It powers endless while true loops and command || true, which keeps an allowed failure from stopping a set -e script.

Syntax

true

Examples

  • $ true && echo ok

    The command after && runs

    Explain

Related