---
name: "osh"
section: "1"
platform: "linux"
package: "oils-for-unix"
version: "0.38.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/osh"
---

# osh(1)

command language interpreter

## NAME

**osh** – command language interpreter

## SYNOPSIS

**osh** \[*options*\] *script* \[*args*\]

**osh** \[*options*\] **-c** \[command\_string\] \[args\]

## DESCRIPTION

The **osh** utility is a [bash(1)](/bash/1.md)-compatible command language interpreter: it reads commands either from standard input, a *script* file or command-line arguments and executes them.

**osh** accepts POSIX [sh(1)](/sh/1.md) arguments, with the following differences:

- **-n**

  Only validate the syntax. Also prints the AST.

- **--ast-format**

  What format the AST should be in.

## ENVIRONMENT

- OILS\_HIJACK\_SHEBANG

  - OILS\_CRASH\_DUMP\_DIR

  ## FILES

The interactive shell only sources *~/.config/oils/oshrc* on startup.

## EXIT STATUS

The **osh** utility exits with one of the following values:

- 1

  One or more runtime errors occurred.

- 2

  One or more parsing errors occurred, either due to incorrect script syntax or improper invocation of a shell builtin.

- 126

  Permission was denied when running a command.

- 127

  The referenced command or script could not be found.

## SEE ALSO

[bash(1)](/bash/1.md), [busybox(1)](/busybox/1.md), [sh(1)](/sh/1.md)

*Docs:* **https://oils.pub/release/0.38.0/doc/**

## AUTHORS

The **osh** utility was written by Andy Chu ⟨*andy@oils.pub*⟩
