Skip to content
Flutter Explained
TwitterVideosProducts

Environment Variables

Configuration1 min read

On my installation videos for Flutter on Windows and MacOS I got loads of comments in which you were the audience asking me that they get the error command not found: flutter and how they can solve this problem. That showed me that there is still a lot of questions around system variables that we want to answer now.

Environment Variables

Whenever you install software via a wizard usually in the background it sets everything up for you. The Installation Wizard of Git is a very good example for that. You download the wizard, click through the process and at the end if you open your terminal you can enter git and get something like this:

1➜ git
2usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
3 [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
4 [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
5 [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
6 [--super-prefix=<path>] [--config-env=<name>=<envvar>]
7 <command> [<args>]

If we take separate the words environment and variable it gets maybe a bit clearer. If you have already some experience as a developer you will know the word variable and understand that it can contain any value that you would like. The environment in the word stands for the OS that you are working on. In this article we mostly will take a look on Windows and macOS, but they exist also for Linux. These environment variables allow you now to execute commands in your terminal, PowerShell or Windows Explorer and the Environment will know what to do.

System and User Environment Variables

Windows offers you in the system settings the "Environment Variables" in there you see the differentiation between system and user variables. While the system variables will be accessible globally for every user the system variables are only accessible for the current user.