1

I recently installed Swift 3.0 on my Ubuntu 16.04, and if I want to access the swift shell, I have to put in

    export PATH=/home/thebigfootsdad/Downloads/swift-3.0-preview-1-ubuntu15.10/usr/bin:"${PATH}"

every time I open terminal.
Is there any way to make this permanent?

I am not really familiar with command-line, and I would appreciate more simple answers please!

I have gone through most of the threads here on

  • 2
    Possible duplicate of [Permanent PATH variable](http://askubuntu.com/questions/500775/permanent-path-variable) (or http://askubuntu.com/questions/60218/how-to-add-a-directory-to-my-path and a bunch of others). – Jacob Vlijm Jun 19 '16 at 09:56

1 Answers1

2

Add the new PATH to your ~/.bashrc by:

echo 'export PATH=/home/thebigfootsdad/Downloads/swift-3.0-preview-1-ubuntu15.10/usr/bin:"${PATH}"' >>~/.bashrc

Or use your favorite editor to edit ~/.bashrc and add the following at the end:

export PATH=/home/thebigfootsdad/Downloads/swift-3.0-preview-1-ubuntu15.10/usr/bin:"${PATH}"
heemayl
  • 90,425
  • 20
  • 200
  • 267