# Use Bottles as wine command

In some specific cases it may be useful to have Bottles as a system WINE command, for example when a program needs to access the command and we want it to use a specific bottle.

### Custom wine command

{% hint style="warning" %}
Make sure you don't have wine installed on your system before proceeding.
{% endhint %}

Make a new file named `wine` in `~/.local/bin` or any directory in your `PATH` with the following content:

```
#!/bin/sh
flatpak run --command='bottles-cli' com.usebottles.bottles run -b MyBottle -e "$@"
```

or the following if you are not using the Flatpak:

```
#!/bin/sh
bottles-cli  run -b MyBottle -e "$@"
```

and change `MyBottle` to the name of your chosen bottle. Then make it executable:

```
chmod +x ~/.local/bin/wine
```

### Usage

Now just run:

```
wine program_name.exe # or installer_name.msi
```

to launch it with Bottles. It will automatically use your chosen bottle.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.usebottles.com/advanced/use-bottles-as-wine-command.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
