true and false (commands)

true
Initial releaseJanuary 1979 (1979-01)
Operating systemUnix and Unix-like
PlatformCross-platform
TypeCommand

true and false are shell commands that exit immediately with exit status 0 or 1, respectively. As a script sets its process exit status to the value of the last command it runs, these commands can be used to set the exit status of a script run. All Unix shells interpret an exit status of zero as success and non-zero (usually) as failure, so true sets success and false sets failure.

The commands are available in Unix-like operating systems.