# How to install Swift once it's built?

**URL:** <https://forums.swift.org/t/how-to-install-swift-once-its-built/38493>\
**Category:** Using Swift\
**Created:** [July 16, 2020, 8:53am UTC](https://forums.swift.org/t/how-to-install-swift-once-its-built/38493 "2020-07-16T08:53:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Finagolfin](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/finagolfin/32/34388_2.png) [@Finagolfin](https://forums.swift.org/u/Finagolfin)\
**Post date:** [July 16, 2020, 2:52pm UTC](https://forums.swift.org/t/how-to-install-swift-once-its-built/38493/2 "2020-07-16T14:52:49Z")

</div>

It's not well-documented, but adding `--install-destdir` will do what you want. The README notes that you can learn a lot by running `utils/build-script -h`, it's listed in there. You may need to patch the install a bit based on your distro layout and installed packages though, as [the Fedora packager had to](https://forums.swift.org/t/swift-5-2-1-on-fedora-where-were-at-and-a-request-for-help/35039).

Alternately, the `--install-swiftpm` flag will have already put everything in a `build/Ninja-Release/toolchain-linux-x86_64` directory, from which you can just manually copy all non-conflicting files to `/usr`.

It isn't an easy process yet, given that Swift builds its own clang that could conflict with an installed clang, so you're probably best off using the Swift toolchain you built from your home directory, by adding that toolchain folder to your path.

---

_[View the full topic](https://forums.swift.org/t/how-to-install-swift-once-its-built/38493)._
