# Questions about hugo environment variables

**URL:** <https://discourse.gohugo.io/t/questions-about-hugo-environment-variables/17865>\
**Category:** support\
**Created:** [March 31, 2019, 7:49am UTC](https://discourse.gohugo.io/t/questions-about-hugo-environment-variables/17865 "2019-03-31T07:49:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [March 31, 2019, 4:28pm UTC](https://discourse.gohugo.io/t/questions-about-hugo-environment-variables/17865/4 "2019-03-31T16:28:35Z")

</div>

> [@numbfall](#):
>
> Not what I was looking for.

He was trying to help (and he pointed you to the `hugo` command, not the “whole documentation”), be grateful and be polite.

So,

You can set it via either

- `HUGO_ENVIRONMENT` os variable
- `--environment` flag

You can get it with `hugo.Environment`. Note that the defaults are `development` for server and `production` for regular `hugo`.

---

_[View the full topic](https://discourse.gohugo.io/t/questions-about-hugo-environment-variables/17865)._
