diff options
| author | bors <bors@rust-lang.org> | 2016-12-17 17:25:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-12-17 17:25:30 +0000 |
| commit | 4a008cccaabc8b3fe65ccf5868b9d16319c9ac58 (patch) | |
| tree | 27dce252f58a63379f2ff4ae1d147e27a4d38e10 | |
| parent | dea7ef3424ec77f855c41bc285603c2d6affef5b (diff) | |
| parent | 7550e321462e9a0590ded68c2984ddc645b877fb (diff) | |
| download | rust-4a008cccaabc8b3fe65ccf5868b9d16319c9ac58.tar.gz rust-4a008cccaabc8b3fe65ccf5868b9d16319c9ac58.zip | |
Auto merge of #38122 - brson:book-rustup, r=steveklabnik
Update book for rustup Supersedes https://github.com/rust-lang/rust/pull/37934 Don't land yet. Needs coordination with https://github.com/rust-lang/rust-www/pull/621 Fixes https://github.com/rust-lang/rust/issues/35653 r? @steveklabnik
| -rw-r--r-- | src/doc/book/getting-started.md | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/doc/book/getting-started.md b/src/doc/book/getting-started.md index 2eab449dbd4..5aae693ad6b 100644 --- a/src/doc/book/getting-started.md +++ b/src/doc/book/getting-started.md @@ -24,41 +24,40 @@ see the website][platform-support]. [platform-support]: https://forge.rust-lang.org/platform-support.html -## Installing on Linux or Mac +## Installing Rust -If we're on Linux or a Mac, all we need to do is open a terminal and type this: +All you need to do on Unix systems like Linux and macOS is open a +terminal and type this: ```bash -$ curl -sSf https://static.rust-lang.org/rustup.sh | sh +$ curl https://sh.rustup.rs -sSf | sh ``` -This will download a script, and start the installation. If it all goes well, -you’ll see this appear: +It will download a script, and start the installation. If everything +goes well, you’ll see this appear: ```text -Rust is ready to roll. +Rust is installed now. Great! ``` -From here, press `y` for ‘yes’, and then follow the rest of the prompts. +Installing on Windows is nearly as easy: download and run +[rustup-init.exe]. It will start the installation in a console and +present the above message on success. -## Installing on Windows +For other installation options and information, visit the [install] +page of the Rust website. -If you're on Windows, please download the appropriate [installer][install-page]. - -[install-page]: https://www.rust-lang.org/install.html +[rustup-init.exe]: https://win.rustup.rs +[install]: https://www.rust-lang.org/install.html ## Uninstalling -Uninstalling Rust is as easy as installing it. On Linux or Mac, run -the uninstall script: +Uninstalling Rust is as easy as installing it: ```bash -$ sudo /usr/local/lib/rustlib/uninstall.sh +$ rustup self uninstall ``` -If we used the Windows installer, we can re-run the `.msi` and it will give us -an uninstall option. - ## Troubleshooting 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. If you do, Rust has been installed successfully! Congrats! -If you don't and you're on Windows, check that Rust is in your %PATH% system -variable: `$ echo %PATH%`. If it isn't, run the installer again, select "Change" -on the "Change, repair, or remove installation" page and ensure "Add to PATH" is -installed on the local hard drive. If you need to configure your path manually, -you can find the Rust executables in a directory like -`"C:\Program Files\Rust stable GNU 1.x\bin"`. +If you don't, that probably means that the `PATH` environment variable +doesn't include Cargo's binary directory, `~/.cargo/bin` on Unix, or +`%USERPROFILE%\.cargo\bin` on Windows. This is the directory where +Rust development tools live, and most Rust developers keep it in their +`PATH` environment variable, which makes it possible to run `rustc` on +the command line. Due to differences in operating systems, command +shells, and bugs in installation, you may need to restart your shell, +log out of the system, or configure `PATH` manually as appropriate for +your operating environment. Rust does not do its own linking, and so you’ll need to have a linker 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 [stackoverflow]: http://stackoverflow.com/questions/tagged/rust This installer also installs a copy of the documentation locally, so we can -read it offline. On UNIX systems, `/usr/local/share/doc/rust` is the location. -On Windows, it's in a `share/doc` directory, inside the directory to which Rust -was installed. +read it offline. It's only a `rustup doc` away! # Hello, world! |
