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.
After you've initiated a batch script run, you can see its status by finding the related activity on the main dashboard:
1. Click the logo in the upper-left corner of the page.
2. If your Fleet instance has multiple teams, select "All teams" from the dropdown.
3. In the "Activity" section, click on the related activity (for example, "**John Doe** ran the **check-status.sh** script on 5 hosts")
4. A modal window will pop up displaying the number of hosts targeted and breaking down the host count by how many have run the script successfully, how many are pending (waiting to run the script) and how many have returned an _error_ (either because they were not eligible to run the script, or because the script returned an error).
5. You may click the numbers next to "Ran", "Pending" and "Error" to view the list of hosts in that state.