Skip to content

Commit 4a008cc

Browse files
committed
Auto merge of #38122 - brson:book-rustup, r=steveklabnik
Update book for rustup Supersedes #37934 Don't land yet. Needs coordination with rust-lang/prev.rust-lang.org#621 Fixes #35653 r? @steveklabnik
2 parents dea7ef3 + 7550e32 commit 4a008cc

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

src/doc/book/getting-started.md

+26-26
Original file line numberDiff line numberDiff line change
@@ -24,41 +24,40 @@ see the website][platform-support].
2424

2525
[platform-support]: https://forge.rust-lang.org/platform-support.html
2626

27-
## Installing on Linux or Mac
27+
## Installing Rust
2828

29-
If we're on Linux or a Mac, all we need to do is open a terminal and type this:
29+
All you need to do on Unix systems like Linux and macOS is open a
30+
terminal and type this:
3031

3132
```bash
32-
$ curl -sSf https://static.rust-lang.org/rustup.sh | sh
33+
$ curl https://sh.rustup.rs -sSf | sh
3334
```
3435

35-
This will download a script, and start the installation. If it all goes well,
36-
you’ll see this appear:
36+
It will download a script, and start the installation. If everything
37+
goes well, you’ll see this appear:
3738

3839
```text
39-
Rust is ready to roll.
40+
Rust is installed now. Great!
4041
```
4142

42-
From here, press `y` for ‘yes’, and then follow the rest of the prompts.
43+
Installing on Windows is nearly as easy: download and run
44+
[rustup-init.exe]. It will start the installation in a console and
45+
present the above message on success.
4346

44-
## Installing on Windows
47+
For other installation options and information, visit the [install]
48+
page of the Rust website.
4549

46-
If you're on Windows, please download the appropriate [installer][install-page].
47-
48-
[install-page]: https://www.rust-lang.org/install.html
50+
[rustup-init.exe]: https://win.rustup.rs
51+
[install]: https://www.rust-lang.org/install.html
4952

5053
## Uninstalling
5154

52-
Uninstalling Rust is as easy as installing it. On Linux or Mac, run
53-
the uninstall script:
55+
Uninstalling Rust is as easy as installing it:
5456

5557
```bash
56-
$ sudo /usr/local/lib/rustlib/uninstall.sh
58+
$ rustup self uninstall
5759
```
5860

59-
If we used the Windows installer, we can re-run the `.msi` and it will give us
60-
an uninstall option.
61-
6261
## Troubleshooting
6362

6463
If we've got Rust installed, we can open up a shell, and type this:
@@ -71,12 +70,15 @@ You should see the version number, commit hash, and commit date.
7170

7271
If you do, Rust has been installed successfully! Congrats!
7372

74-
If you don't and you're on Windows, check that Rust is in your %PATH% system
75-
variable: `$ echo %PATH%`. If it isn't, run the installer again, select "Change"
76-
on the "Change, repair, or remove installation" page and ensure "Add to PATH" is
77-
installed on the local hard drive. If you need to configure your path manually,
78-
you can find the Rust executables in a directory like
79-
`"C:\Program Files\Rust stable GNU 1.x\bin"`.
73+
If you don't, that probably means that the `PATH` environment variable
74+
doesn't include Cargo's binary directory, `~/.cargo/bin` on Unix, or
75+
`%USERPROFILE%\.cargo\bin` on Windows. This is the directory where
76+
Rust development tools live, and most Rust developers keep it in their
77+
`PATH` environment variable, which makes it possible to run `rustc` on
78+
the command line. Due to differences in operating systems, command
79+
shells, and bugs in installation, you may need to restart your shell,
80+
log out of the system, or configure `PATH` manually as appropriate for
81+
your operating environment.
8082

8183
Rust does not do its own linking, and so you’ll need to have a linker
8284
installed. Doing so will depend on your specific system. For
@@ -106,9 +108,7 @@ resources include [the user’s forum][users] and [Stack Overflow][stackoverflow
106108
[stackoverflow]: http://stackoverflow.com/questions/tagged/rust
107109

108110
This installer also installs a copy of the documentation locally, so we can
109-
read it offline. On UNIX systems, `/usr/local/share/doc/rust` is the location.
110-
On Windows, it's in a `share/doc` directory, inside the directory to which Rust
111-
was installed.
111+
read it offline. It's only a `rustup doc` away!
112112

113113
# Hello, world!
114114

0 commit comments

Comments
 (0)