> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FlexDeploy - Unix Shell Plugin Guide

> The Unix Shell plugin provides a means to run any shell command(s) or any existing shell script(s). Refer to the for reference on available variables.

The Unix Shell plugin provides a means to run any shell command(s) or any existing shell script(s).

Refer to the [FlexDeploy - Variables Guide](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-variables-guide.md) for reference on available variables.

# Supported Versions

* OEL5-9

* AIX

* Solaris

# Key Features

* User-defined inputs/outputs allowed

* Can run any shell command(s)

* Can run any shell script(s)

# Plugin Operations

* [execute (Shell)](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-plugin-guides/flexdeploy-unix-shell-plugin-guide/execute-shell.md)
* [packageExecute (Shell)](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-plugin-guides/flexdeploy-unix-shell-plugin-guide/packageexecute-shell.md)

# Special Considerations

Shell plugin operations allow for restricting environment variables passed to child process. See `Restrict Environment` and `No Secure Variables` plugin inputs. Although note that FlexDeploy plugin execution context environment variables will always be present in child process. For example, `FD_TEMP_DIR`, `FD_ENVIRONMENT_CODE` etc. and more will be part of child process environment. This should not cause any issues but if that is not desired in cases where you are starting server process (long running) then you can take approach shown below to clear environment. Here is shell plugin script code (Groovy) to start tomcat process without inheriting parent plugin process’s environment.

```
'env -i HOME=\"$HOME\" bash -l -c  \'cd ' + FDTOM_CATALINA_HOME + '/bin && nohup ./startup.sh \\& && sleep 10\''
```
