===============================================
Editing Navigator and conda configuration files
===============================================

You can edit Navigator and conda configuration files through either the :ref:`Navigator Preferences dialog <navigator-preferences>` or in your :ref:`preferred text editor <preferred-text-editor>`.

.. caution::

   Be careful when changing values directly in the configuration files for Navigator or conda. Incorrect configuration can cause issues with these products.

.. _navigator-preferences: 

Editing with the Navigator Preferences dialog
=============================================

#. In Anaconda Navigator, open the Navigator Preferences dialog.

   .. tab-set::

      .. tab-item:: Windows/Linux

         Open the **File** menu and click *Preferences*.

      .. tab-item:: macOS

         Open the **Anaconda Navigator** or **python** menu and click *Preferences*.

#. Click **Configure Navigator** to open the ``anaconda-navigator.ini`` file or click **Configure Conda** to open the ``.condarc`` file within Navigator.
#. Edit the file to change any configurations.

   When you edit the Navigator and conda configuration files in Navigator, a validation tool warns you about missed requirements or incorrect formatting. The ``.condarc`` file must be a valid ``.yaml`` format file.

   .. thumbnail:: ../img/nav-config-file-validation.png
      :align: center

#. Click **Save and Restart** to save any changes to the open configuration file and restart Navigator.

.. _preferred-text-editor:

Editing with your preferred text editor
=======================================

Follow these steps to locate, open, and edit the ``.condarc`` or ``anaconda-navigator.ini`` files in your preferred text editor:

.. tab-set::

   .. tab-item:: Edit ``.condarc``

      #. Open your ``.condarc`` file in your text editor of choice.

         .. dropdown:: Where is my ``.condarc`` file?
            :color: primary
            :animate: fade-in

            To locate your ``.condarc`` file, open Anaconda Prompt (Terminal on macOS/Linux) and run the following command: 

               .. code-block:: none 

                  conda config --show-sources

               **Example return:**

               .. code-block:: none

                  ==> /Users/<USERNAME>/.condarc <==
                  channels:
                  - defaults

               While the ``.condarc`` is most likely in your Home directory, it is a hidden file, and is not visible in file browsers under normal circumstances. For help viewing hidden files on:
        
               .. tab-set:: 

                  .. tab-item:: Windows :fab:`windows`

                     For more information on viewing hidden files and folders in Windows, see `View hidden files and folders in Windows <https://support.microsoft.com/en-us/windows/view-hidden-files-and-folders-in-windows-97fbc472-c603-9d90-91d0-1166d1d9f4b5#WindowsVersion=Windows_11>`_ in Microsoft's documentation.

                  .. tab-item:: macOS :fab:`apple`

                     To view hidden files on macOS, use Shift+Cmd+. in your Finder. 
            
                  .. tab-item:: Linux :fab:`linux`

                     To view hidden files on Linux, use Alt+. or Ctrl+H (depending on your file manager).
                        
      #. Make and save your changes.

         The ``.condarc`` file must be a valid ``.yaml`` format file. 

      #. Close and reopen Navigator or any Anaconda Prompt or command line windows.

   .. tab-item:: Edit ``anaconda-navigator.ini``

      #. Open your ``anaconda-navigator.ini`` file in your text editor of choice.

         .. dropdown:: Where is my ``anaconda-navigator.ini`` file?
            :color: primary
            :animate: fade-in

            The ``anaconda-navigator.ini`` file is created after you have opened Navigator for the first time. It is located in the ``navigator`` folder, which is inside a hidden ``.anaconda`` folder your Home directory.
               
            Hidden files and folders are not visible in file browsers under normal circumstances. For help viewing hidden files on:

            .. tab-set:: 

               .. tab-item:: Windows :fab:`windows`

                  For more information on viewing hidden files and folders in Windows, see `View hidden files and folders in Windows <https://support.microsoft.com/en-us/windows/view-hidden-files-and-folders-in-windows-97fbc472-c603-9d90-91d0-1166d1d9f4b5#WindowsVersion=Windows_11>`_ in Microsoft's documentation.

               .. tab-item:: macOS :fab:`apple`

                  To view hidden files on macOS, use Shift+Cmd+. in your Finder. 
            
               .. tab-item:: Linux :fab:`linux`

                  To view hidden files on Linux, use Alt+. or Ctrl+H (depending on your file manager).

      #. Make and save your changes.
      #. Close and reopen Navigator or any Anaconda Prompt or command line windows.