# LibTmux::Async::Server#set_environment

- **Module:** LibTmux::Async
- **Package:** libtmux-async
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/c8b839595d5a30e271e3f9be0d0fe811ddb11b7e/gems/libtmux/lib/libtmux/operations.rb#L81
- **Public owner:** LibTmux::Server#set_environment
- **Page:** https://libtmux.org/en/ruby/v0.1.0/reference/libtmux-async-server-set_environment/

tmux command: [`set-environment`](/en/tmux/latest/manual/set-environment/)

```
def set_environment: (
  ::String,
  ::String,
  ?hidden: bool,
  ?timeout: ::Numeric,
  ?cancel: untyped
) -> ::LibTmux::CommandResult
```

Behavior: Environment.

Behavior contract: Environment.

## Parameters

- `arg1` (`::String`)
- `arg2` (`::String`)
- `hidden` (`bool`)
- `timeout` (`::Numeric`)
- `cancel` (`untyped`)
