Home  /  Resources & support  /  FAQs  /  Linux install

How do I instal Stata on a Unix/Linux machine using a USB?

Title   Unix/Linux installation
Author Kevin Crow, StataCorp

To install Stata for Unix/Linux:

  1. Become superuser (root) and insert the installation USB.
  2. Create the installation directory (we recommend /usr/local/stata## where ## is your Stata version) with 755 permissions and change into that directory.
  3. You can copy the contents of the USB to a temporary location and run the installer from there:
    # mkdir /tmp/statainstall
    # cp -a /path/to/usb/* /tmp/statainstall
    # mkdir /usr/local/stata16
    # cd /usr/local/stata16
    # /tmp/statainstall/install
    
    NOTE:  current Linux distributions will generally automount the USB as /media/Stata
    
  4. Once the installer has completed, you must initialize the license by typing ./stinit
  5. If you can't copy the USB to the drive, then try this: because most current Linux distributions will automatically mount an inserted USB with the noexec option, you will need to remount the device with the proper options, or the Stata installer will fail.
    # umount /mnt/usb
    # mount -o exec -t iso9660 /dev/usb /mnt/usb
    
    NOTE:   you may need to change the devices to be appropriate for your machine
    
    You can now launch the Stata installer by typing /mnt/usb/install from within the directory you created in step 2.