# server.settings.Server.hide_environment

- **Module:** server.settings.Server
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/server/settings.rs#L252
- **Page:** https://libtmux.org/reference/rs/server-settings-server-hide_environment/

```
server.settings.Server.hide_environment(self, name: &str) -> Result<(), Error>
```

Hide a variable from processes tmux starts.

Different from [`Self::unset_environment`], which deletes the server's
own entry and lets whatever tmux was started with show through. This
keeps an entry and marks it, so a process started afterwards is handed
an environment with the name *absent* even though the tmux server was
started with one. It is what [`EnvironmentEntry::Removed`] reports.

# Errors

Returns an error when tmux rejects the name.
