Shell scripts are supported on macOS and Linux. By default, shell scripts will run in the host's (root) shell (`/bin/sh`). We also support `/bin/zsh` and `/bin/bash` interpreters.
Note: To run in `/bin/zsh` or `/bin/bash`, create `.sh` file (only supported extension) and add an interpreter at the first line.
1. In Fleet, head to the **Controls > Scripts** tab and upload your script.
2. Head to the **Hosts** page. If you're on Fleet Premium, select a team (or "no team").
3. Click the checkbox next to one or more hosts you want to run the script on.
4. Click "Run script" in the table header.
5. In the popup modal, find the script you'd like to run, move the mouse pointer to that item in the list and click the "Run script" button that appears.
Scripts run from the Fleet UI will run the next time your host checks in with Fleet. You can view the status of the script execution as well as the output in the target host's activity feed.
When executing a script on more than one host, you can view the status of the batch of hosts by clicking on the related item in the global activity feed.
You can execute a script on a large number of hosts at the same time using the Fleet UI or Fleet API. Batch script runs can be scheduled to run as soon as possible or at any point in the future.
After you've initiated a batch script run, you can see its status by navigating to **Controls > Scripts**, and clicking on the **Batch progress** item in the side menu. Batches that have started running will be listed under the **Started** tab. Batches scheduled for a future date will be listed under **Scheduled**, and batches that have completed their run or have been canceled will appear under **Finished**.
To see a breakdown of the hosts targeted by a specific batch script run, click on that run's entry in the **Started**, **Scheduled**, or **Finished** list.