> ## Documentation Index
> Fetch the complete documentation index at: https://bun.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://bun.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://bun.manicule.dev/api/mcp.
> Every agent surface: https://bun.manicule.dev/.well-known/llms-manifest.json

# Write to stdout (/guides/write-file/stdout)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 106 · updated: 2026-08-02 -->
Related: [Append content to a file](/guides/write-file/append.md), [Write a string to a file](/guides/write-file/basic.md), [Write a Blob to a file](/guides/write-file/blob.md), [Write a file to stdout](/guides/write-file/cat.md), [Copy a file to another location](/guides/write-file/file-cp.md), [Write a file incrementally](/guides/write-file/filesink.md)

The `console.log` function writes to `stdout` and appends a line break to the printed data.

```ts
console.log("Lorem ipsum");
```

***

Bun also exposes `stdout` as a `BunFile` with the `Bun.stdout` property. Pass it as the destination to [`Bun.write()`](/runtime/file-io#writing-files-bun-write).

```ts
await Bun.write(Bun.stdout, "Lorem ipsum");
```

***

See [`Bun.write()`](/runtime/file-io#writing-files-bun-write).
