ENV(1)

ENV(1) β€” the group chat manual page πŸ’–

okay so bestie, this is env, from the General Commands Manual, and honestly? it's giving backstage-pass energy. it's the little tool that sets up the environment before your actual command even shows up to the party. every script's shebang is lowkey obsessed with it. let's get into it 🫢


✨ NAME ✨

env β€” Set each NAME to VALUE in the environment and run COMMAND

no cap, that's the whole vibe. you're the environment's stylist. you dress it up, you send it out. πŸ’…


🌸 SYNOPSIS 🌸

env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]

look at her. options, then maybe a little -, then your NAME=VALUE fits, then the actual command and its args. stunning, iconic, no notes. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

Set each NAME to VALUE in the environment and run COMMAND

that's it. that's the job. you set the vibes (environment variables), then the command runs inside those vibes. main character energy fr fr. ✨


πŸ‘‘ OPTIONS πŸ‘‘

here's the full menu, bestie. every single one, we're not skipping any:

  • -i, --ignore-environment β€” start with an empty environment. blank slate, fresh face, no baggage. 🧼
  • -C, --chdir <DIR> β€” change the working directory to DIR. like walking into a different room before you start talking. πŸšͺ
  • -0, --null β€” end each output line with a 0 byte rather than a newline (only valid when printing the environment). yes, the lil' weird one. only when you're printing, okay?? 😀
  • -f, --file <PATH> β€” read and set variables from a ".env"-style configuration file (prior to any unset and/or set). yes bestie, it reads .env files natively, we love a glow-up. πŸ“„
  • -u, --unset <NAME> β€” remove variable from the environment. bye babe, we're not taking you with us. πŸ‘‹
  • -v, --debug β€” print verbose information for each processing step. for when you need to know everything that's happening. nosy in a productive way. πŸ”
  • -S, --split-string <S> β€” process and split S into separate arguments; used to pass multiple arguments on shebang lines. the shebang workaround, iykyk. πŸͺ„
  • -a, --argv0 <a> β€” Override the zeroth argument passed to the command being executed. Without this option a default value of command is used. yes, you can catfish a program into thinking it's called something else. 🎭
  • --ignore-signal[=<SIG>] β€” set handling of SIG signal(s) to do nothing. "i don't see it, i don't hear it, it's not happening." πŸ™ˆ
  • --default-signal[=<SIG>] β€” reset handling of SIG signal(s) to the default action. back to factory settings, periodt. βš™οΈ
  • --block-signal[=<SIG>] β€” block delivery of SIG signal(s) while running COMMAND. hold the door, we're busy. 🚧
  • --list-signal-handling β€” list signal handling changes requested by preceding options. receipts! 🧾
  • -h, --help β€” Print help. πŸ’¬
  • -V, --version β€” Print version. 🏷️
  • [vars] β€” yep, that's a legit entry in the options list, just sitting there. the variables go here bestie. πŸ€·β™€οΈ

πŸ’œ EXTRA πŸ’œ

a mere - implies -i. so if you're feeling minimalist, one lil' dash and the environment gets emptied out. If no COMMAND, print the resulting environment. (so you can just peek at what you built. show-off behavior, love that.) πŸ‘€


⭐ VERSION ⭐

v(uutils coreutils) 0.12.0


πŸ”₯ EXAMPLES πŸ”₯

okay, demo time. these are the moves:

Show the environment:

env

Run a program. Often used in scripts after the shebang (#!) for looking up the path to the program:

env program

Clear the environment and run a program:

env [-i|--ignore-environment] program

Remove variable from the environment and run a program:

env [-u|--unset] variable program

Set a variable and run a program:

env variable=value program

Set one or more variables and run a program:

env variable1=value variable2=value variable3=value ... program

Run a program under a different name:

env [-a|--argv0] custom_name program
The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. ⚠️

and that's the page bestie!! this one was written on 2026-09-25 and it covers v(uutils coreutils) 0.12.0 β€” go forth and set some variables, you absolute icon πŸŒˆπŸ’–βœ¨

πŸ“¦ where this page comes from