==========================
Anaconda for Linux install
==========================

.. _linux-install:

#. In your browser, download the `Anaconda installer for Linux <http://continuum.io/downloads.html>`_.

#. Optional: :doc:`Verify data integrity with MD5 or SHA-256 <hashes/index>`.
   (For more information on hashes, see `cryptographic hash validation <http://conda.pydata.org/docs/download.html#what-about-cryptographic-hash-verification>`_.)
   
   #. Run the following::
      
        md5sum /path/filename 
           
      OR::
         
        sha256sum /path/filename
           
   #. Verify results against :ref:`the proper hash page <anaconda-hashes-linux>` 
      to make sure the hashes match.

#. Enter the following to install Anaconda for Python 3.6::
    
     bash ~/Downloads/Anaconda3-4.3.1-Linux-x86_64.sh
    
   OR 
   
   Enter the following to install Anaconda for Python 2.7::

      bash ~/Downloads/Anaconda2-4.3.1-Linux-x86_64.sh 

   NOTE: You should include the ``bash`` command regardless of whether you are 
   using Bash shell.
   
   NOTE: Replace actual download path and filename as necessary.
   
   NOTE: Install Anaconda as a user unless root privileges are required.
   
#. The installer prompts "In order to continue the installation process, 
   please review the license agreement." Click Enter to view license terms.
   
#. Scroll to the bottom of the license terms and enter ``yes`` to agree to them.
   
#. The installer prompts you to click Enter to accept the default install location, 
   press CTRL-C to cancel the installation, or specify an alternate installation 
   directory. If you accept the default install location, the installer displays 
   "PREFIX=/home/<user>/anaconda<2 or 3>" and continues the installation. 
   It may take a few minutes to complete. 

#. The installer prompts "Do you wish the installer to prepend the Anaconda<2 or 3> 
   install location to PATH in your /home/<user>/.bashrc ?" We recommend ``yes``. 
   
   NOTE: If you enter "no", you will need to manually specify the path to Anaconda 
   when using Anaconda. To manually add the prepended path, edit file ``.bashrc`` 
   to add ``~/anaconda<2 or 3>/bin`` to your path manually using::
   
      export PATH="/home/<user>/anaconda<2 or 3>/bin:$PATH"

   Replace ``/home/<user>/anaconda<2 or 3>`` with the actual path.
   
#. The installer finishes and displays "Thank you for installing Anaconda<2 or 3>!" 

#. Close and open your terminal window for the installation to take effect, or you can 
   enter the command ``source ~/.bashrc``.

#. Enter ``conda list``. If the installation was successful, 
   the terminal window should display a list of installed Anaconda packages. 

After your install completes, start using Anaconda with the instructions in :ref:`next`

NOTE: If you install multiple versions of Anaconda, the system should always default to
the most current version, as long as you haven't altered the default install path.
