»  Home »  Resources & support »  FAQs »  Install Stata from a terminal

How to install Stata from a terminal

Title   Install Stata from a terminal
Author Chinh Nguyen, StataCorp

Stata's installer allows you to install Stata/MP, Stata/SE, or Stata/IC from a terminal.

  1. Mount the Stata disk image. For instructions on how to mount the disk image from a terminal, see Mounting a Stata disk image (DMG) from a terminal or mount the disk image from the Finder.
  2. Create a plain text file named mychoice.xml and include the following text:
  3. If you wish to install Stata/SE, then replace installer_choice_1 with installer_choice_2:
          installer_choice_1:     Stata/MP
          installer_choice_2:     Stata/SE
          installer_choice_3:     Stata/IC
  4. Enter the following command with the path to the Stata installer package:
          sudo installer -package /Volumes/Stata/Install\ Stata.pkg -applyChoiceChangesXML mychoice.xml -target / 

Mounting a Stata disk image (DMG) from a terminal

From a terminal, use the following command to mount the disk image:

      hdiutil attach /path/to/Stata16.dmg 

When the disk image is mounted, a message will display something like this:

      /dev/disk7              GUID_partition_scheme
      /dev/disk7s1            Apple_HFS                       /Volumes/Stata

Take note of the entry with the mounted disk image named Stata. You will use the entry's /dev node path to unmount the disk image (/dev/disk7s1).

Unmounting a disk image (DMG) from a terminal

Using the device name of the mounted disk image, use the following command to unmount the disk image:

      hdiutil detach /dev/disk7s1





The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn YouTube Instagram
© Copyright 1996–2023 StataCorp LLC   •   Terms of use   •   Privacy   •   Contact us