How To Install Env In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Env In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

env

Show the environment or run a program in a modified environment.

Maintainer: Michael Stone



Section: utils

Install env

  • Debian apt-get install coreutils Click to copy
  • Ubuntu apt-get install coreutils Click to copy
  • Alpine OS apk add coreutils Click to copy
  • Arch Linux pacman -S coreutils Click to copy
  • Kali Linux apt-get install coreutils Click to copy
  • CentOS yum install coreutils Click to copy
  • Fedora dnf install coreutils Click to copy
  • Raspbian apt-get install coreutils Click to copy
  • macOS brew install coreutils Click to copy

Show the environment or run a program in a modified environment.

How to use env?

Below are few example commands for env that you can use in the terminal.

Show the environment:
envClick to copy
Run a program. Often used in scripts after the shebang (#!) for looking up the path to the program:
env programClick to copy
Clear the environment and run a program:
env -i programClick to copy
Remove variable from the environment and run a program:
env -u variable programClick to copy
Set a variable and run a program:
env variable=value programClick to copy
Installing env command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS operating systems. Once you run the command it will install the latest version of env 2024 package in your OS.