Skip to content

Commit 5f059b2

Browse files
authored
Add standalone doc covering manual installation (#12011)
Adds a page that covers manual installation of Flutter, partially reusing existent content but with simplifications and reformatting. Contributes to #11911
1 parent 5e11605 commit 5f059b2

File tree

9 files changed

+803
-301
lines changed

9 files changed

+803
-301
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
:::note
2+
The following steps assume
3+
you've already [turned on Linux support][chromeos-linux] and that
4+
you're using Bash or the default shell on ChromeOS.
5+
6+
If you're using a different shell besides the default or Bash, follow the
7+
[add to path instructions for Linux][linux-path]{: target="_blank"} instead.
8+
:::
9+
10+
1. <h3>Determine your Flutter SDK installation location</h3>
11+
12+
Copy the absolute path to the directory that you
13+
downloaded and extracted the Flutter SDK into.
14+
15+
1. <h3>Add the Flutter SDK bin to your path</h3>
16+
17+
To add the `bin` directory of your Flutter installation to your `PATH`:
18+
19+
1. Copy the following command.
20+
1. Replace `<path-to-sdk>` with the path to your Flutter SDK install.
21+
1. Run the edited command in your preferred terminal.
22+
23+
```console
24+
$ echo 'export PATH="<path-to-sdk>:$PATH"' >> ~/.bash_profile
25+
```
26+
27+
For example, if you downloaded Flutter into a
28+
`development/flutter` folder inside your user directory,
29+
you'd run the following:
30+
31+
```console
32+
$ echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.bash_profile
33+
```
34+
35+
1. <h3>Apply your changes</h3>
36+
37+
To apply this change and get access to the `flutter` tool,
38+
close and reopen all open Zsh sessions in your terminal apps and IDEs.
39+
40+
1. <h3>Validate your setup</h3>
41+
42+
To ensure you successfully added the SDK to your `PATH`,
43+
open a Zsh session in your preferred terminal,
44+
then try running the `flutter` and `dart` tools.
45+
46+
```console
47+
$ flutter --version
48+
$ dart --version
49+
```
50+
51+
If either command isn't found,
52+
check out [Flutter installation troubleshooting][troubleshoot].
53+
54+
{: .steps}
55+
56+
[chromeos-linux]: https://support.google.com/chromebook/answer/9145439
57+
[linux-path]: /install/add-to-path#linux
58+
[troubleshoot]: /install/troubleshoot
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
1. <h3>Determine your Flutter SDK installation location</h3>
2+
3+
Copy the absolute path to the directory that you
4+
downloaded and extracted the Flutter SDK into.
5+
6+
1. <h3>Determine your default shell</h3>
7+
8+
If you don't know what shell you use,
9+
check which shell starts when you open a new console window.
10+
11+
```console
12+
$ echo $SHELL
13+
```
14+
15+
1. <h3>Add the Flutter SDK bin to your path</h3>
16+
17+
To add the `bin` directory of your Flutter installation to your `PATH`:
18+
19+
1. Expand the instructions for your default shell.
20+
1. Copy the provided command.
21+
1. Replace `<path-to-sdk>` with the path to your Flutter SDK install.
22+
1. Run the edited command in your preferred terminal with that shell.
23+
24+
<hr>
25+
26+
<details>
27+
<summary>Expand for <code>bash</code> instructions</summary>
28+
29+
```console
30+
$ echo 'export PATH="<path-to-sdk>:$PATH"' >> ~/.bash_profile
31+
```
32+
33+
For example, if you downloaded Flutter into a
34+
`development/flutter` folder inside your user directory,
35+
you'd run the following:
36+
37+
```console
38+
$ echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.bash_profile
39+
```
40+
41+
</details>
42+
43+
<details>
44+
<summary>Expand for <code>zsh</code> instructions</summary>
45+
46+
```console
47+
$ echo 'export PATH="<path-to-sdk>/bin:$PATH"' >> ~/.zshenv
48+
```
49+
50+
For example, if you downloaded Flutter into a
51+
`development/flutter` folder inside your user directory,
52+
you'd run the following:
53+
54+
```console
55+
$ echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.zshenv
56+
```
57+
58+
</details>
59+
60+
<details>
61+
<summary>Expand for <code>fish</code> instructions</summary>
62+
63+
```console
64+
$ fish_add_path -g -p <path-to-sdk>/bin
65+
```
66+
67+
For example, if you downloaded Flutter into a
68+
`development/flutter` folder inside your user directory,
69+
you'd run the following:
70+
71+
```console
72+
$ fish_add_path -g -p ~/development/flutter/bin
73+
```
74+
75+
</details>
76+
77+
<details>
78+
<summary>Expand for <code>csh</code> instructions</summary>
79+
80+
```console
81+
$ echo 'setenv PATH "<path-to-sdk>/bin:$PATH"' >> ~/.cshrc
82+
```
83+
84+
For example, if you downloaded Flutter into a
85+
`development/flutter` folder inside your user directory,
86+
you'd run the following:
87+
88+
```console
89+
$ echo 'setenv PATH "$HOME/development/flutter/bin:$PATH"' >> ~/.cshrc
90+
```
91+
92+
</details>
93+
94+
<details>
95+
<summary>Expand for <code>tcsh</code> instructions</summary>
96+
97+
```console
98+
$ echo 'setenv PATH "<path-to-sdk>/bin:$PATH"' >> ~/.tcshrc
99+
```
100+
101+
For example, if you downloaded Flutter into a
102+
`development/flutter` folder inside your user directory,
103+
you'd run the following:
104+
105+
```console
106+
$ echo 'setenv PATH "$HOME/development/flutter/bin:$PATH"' >> ~/.tcshrc
107+
```
108+
109+
</details>
110+
111+
<details>
112+
<summary>Expand for <code>ksh</code> instructions</summary>
113+
114+
```console
115+
$ echo 'export PATH="<path-to-sdk>/bin:$PATH"' >> ~/.profile
116+
```
117+
118+
For example, if you downloaded Flutter into a
119+
`development/flutter` folder inside your user directory,
120+
you'd run the following:
121+
122+
```console
123+
$ echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.profile
124+
```
125+
126+
</details>
127+
128+
<details>
129+
<summary>Expand for <code>sh</code> instructions</summary>
130+
131+
```console
132+
$ echo 'export PATH="<path-to-sdk>/bin:$PATH"' >> ~/.profile
133+
```
134+
135+
For example, if you downloaded Flutter into a
136+
`development/flutter` folder inside your user directory,
137+
you'd run the following:
138+
139+
```console
140+
$ echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.profile
141+
```
142+
143+
</details>
144+
145+
1. <h3>Apply your changes</h3>
146+
147+
To apply this change and get access to the `flutter` tool,
148+
close and reopen all open shell sessions in your terminal apps and IDEs.
149+
150+
1. <h3>Validate your setup</h3>
151+
152+
To ensure you successfully added the SDK to your `PATH`,
153+
open your preferred terminal with your default shell,
154+
then try running the `flutter` and `dart` tools.
155+
156+
```console
157+
$ flutter --version
158+
$ dart --version
159+
```
160+
161+
If either command isn't found,
162+
check out [Flutter installation troubleshooting][troubleshoot].
163+
164+
{: .steps}
165+
166+
[troubleshoot]: /install/troubleshoot
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
:::note
2+
The following steps assume you're
3+
using the [default shell][zsh-mac] on macOS, Zsh.
4+
Zsh uses the `.zshenv` file for configuring [environment variables][zsh-files].
5+
6+
If you use another shell besides Zsh,
7+
check out [this tutorial on setting your PATH][other-path].
8+
:::
9+
10+
1. <h3>Determine your Flutter SDK installation location</h3>
11+
12+
Copy the absolute path to the directory that you
13+
downloaded and extracted the Flutter SDK into.
14+
15+
1. <h3>Open or create the Zsh environment variable file</h3>
16+
17+
If it exists, open the Zsh environment variable file `~/.zshenv`
18+
in your preferred text editor.
19+
If it doesn't exist, create the `~/.zshenv` file.
20+
21+
1. <h3>Add the Flutter SDK bin to your path</h3>
22+
23+
At the end of your `~/.zshenv` file,
24+
use the built-in `export` command to update the `PATH` variable
25+
to include the `bin` directory of your Flutter installation.
26+
27+
Replace `<path-to-sdk>` with the path to your Flutter SDK install.
28+
29+
```bash
30+
export PATH="<path-to-sdk>/bin:$PATH"
31+
```
32+
33+
For example, if you downloaded Flutter into a
34+
`development/flutter` folder inside your user directory,
35+
you'd add the following to the file:
36+
37+
```bash
38+
export PATH="$HOME/development/flutter/bin:$PATH"
39+
```
40+
41+
1. <h3>Save your changes</h3>
42+
43+
Save, then close, the `~/.zshenv` file you edited.
44+
45+
1. <h3>Apply your changes</h3>
46+
47+
To apply this change and get access to the `flutter` tool,
48+
close and reopen all open Zsh sessions in your terminal apps and IDEs.
49+
50+
1. <h3>Validate your setup</h3>
51+
52+
To ensure you successfully added the SDK to your `PATH`,
53+
open a Zsh session in your preferred terminal,
54+
then try running the `flutter` and `dart` tools.
55+
56+
```console
57+
$ flutter --version
58+
$ dart --version
59+
```
60+
61+
If either command isn't found,
62+
check out [Flutter installation troubleshooting][troubleshoot].
63+
64+
{: .steps}
65+
66+
[zsh-mac]: https://support.apple.com/en-us/102360
67+
[zsh-files]: https://zsh.sourceforge.io/Intro/intro_3.html
68+
[other-path]: https://www.cyberciti.biz/faq/unix-linux-adding-path/
69+
[troubleshoot]: /install/troubleshoot
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
2+
1. <h3>Determine your Flutter SDK installation location</h3>
3+
4+
Copy the absolute path to the directory that you
5+
downloaded and extracted the Flutter SDK into.
6+
7+
1. <h3>Navigate to the environment variables settings</h3>
8+
9+
1. Press <kbd>Windows</kbd> + <kbd>Pause</kbd>.
10+
11+
If your keyboard lacks a <kbd>Pause</kbd> key,
12+
try <kbd>Windows</kbd> + <kbd>Fn</kbd> + <kbd>B</kbd>.
13+
14+
The **System > About** dialog opens.
15+
16+
1. Click **Advanced System Settings**
17+
<span aria-label="and then">></span> **Advanced**
18+
<span aria-label="and then">></span> **Environment Variables...**
19+
20+
The **Environment Variables** dialog opens.
21+
22+
1. <h3>Add the Flutter SDK bin to your path</h3>
23+
24+
1. In the **User variables for (username)** section
25+
of the **Environment Variables** dialog,
26+
look for the **Path** entry.
27+
28+
1. If the **Path** entry exists, double-click it.
29+
30+
The **Edit Environment Variable** dialog should open.
31+
32+
1. Double-click inside an empty row.
33+
34+
1. Type the path to the `bin` directory of your Flutter installation.
35+
36+
For example, if you downloaded Flutter into a
37+
`dev\flutter` folder inside your user directory,
38+
you'd type the following:
39+
40+
```plaintext
41+
%USERPROFILE%\dev\flutter\bin
42+
```
43+
44+
1. Click the Flutter entry you added to select it.
45+
46+
1. Click **Move Up** until the Flutter entry sits at the top of the list.
47+
48+
1. To confirm your changes, click **OK** three times.
49+
50+
{: type="a"}
51+
52+
1. If the entry doesn't exist, click **New...**.
53+
54+
The **Edit Environment Variable** dialog should open.
55+
56+
1. In the **Variable Name** box, type `Path`.
57+
58+
1. In the **Variable Value** box,
59+
type the path to the `bin` directory of your Flutter installation.
60+
61+
For example, if you downloaded Flutter into a
62+
`dev\flutter` folder inside your user directory,
63+
you'd type the following:
64+
65+
```plaintext
66+
%USERPROFILE%\dev\flutter\bin
67+
```
68+
69+
1. To confirm your changes, click **OK** three times.
70+
71+
{: type="a"}
72+
73+
1. <h3>Apply your changes</h3>
74+
75+
To apply this change and get access to the `flutter` tool,
76+
close and reopen all open command prompts,
77+
sessions in your terminal apps, and IDEs.
78+
79+
1. <h3>Validate your setup</h3>
80+
81+
To ensure you successfully added the SDK to your `PATH`,
82+
open command prompt or your preferred terminal app,
83+
then try running the `flutter` and `dart` tools.
84+
85+
```console
86+
$ flutter --version
87+
$ dart --version
88+
```
89+
90+
If either command isn't found,
91+
check out [Flutter installation troubleshooting][troubleshoot].
92+
93+
{: .steps}
94+
95+
[troubleshoot]: /install/troubleshoot

0 commit comments

Comments
 (0)