Skip to content

Glossary: Linux for Developers

&& and ||

Also written: &&, ||

`&&` runs the next command only if the first succeeded, and `||` runs it only if the first failed. For example, `systemctl is-active --quiet shop && echo "shop is up"`.

Where the book teaches it

Related terms

exit code$? (last exit code)