Where to unpack the android studio file?
The key parts of the question as I see them: user is new to Ubuntu/Linux, user wants a recommendation based off of best practices and basic user experience.
@luis-de-sousa was correct in pointing out the Ubuntu directory structure, but I used this reference from Official Sources.
If you want android-studio to be available to all users (based on the above) you should be unpacking the tar/tgz/zip to /opt
rather than the /usr/local
or /usr/bin
(with the latter being preferred for specific-user installations). Setup properly, we shouldn't need to change user group permissions or any other high-level administration.
- Unpack the downloaded tar/tgz/zip file where it lays
- Using a Terminal window, navigate to that folder location (probably
cd ~/Downloads
), invokesudo -i
(You will need administrator/su permissions for the next few steps) mv android-studio /opt
moves the files you unpacked (requires permissions)gedit android-studio.desktop
this opens a text editor so that we may create a shortcut icon to open your new program. Insert the following code, then save the .desktop file.[Desktop Entry] Name=Android Studio Comment=Integerated Development Environment for Android Exec=/opt/android-studio/bin/studio.sh Icon=/opt/android-studio/bin/studio.png Terminal=false Type=Application Categories=Development;IDE
To finish up,
desktop-file-install android-studio.desktop
We are done with the terminal window, you can close it or exit
That .desktop file now allows you to search for and find android-studio within Ubuntu's Unity interface (or whatever DE menu/dash you are using). In other words, click that icon in the upper-left to search for android-studio You may also right-click on the icon while it is running and "lock it to the launcher."
You can also create menu options to appear for your application launcher, see the Ubuntu Documentation on Unity Launchers.
Besides the in-text citations, I also referenced the following pages extensively:
http://naveensnayak.wordpress.com/2013/05/15/ubuntu-13-04-adding-launchers-to-unity-panel/
How to install Eclipse?
http://developer.android.com/sdk/installing/studio.html#Installing
In Linux, programmes are usually stored in /usr/local
or /usr/share
; when you install a programme with apt
it is automatically set up inside one of these folders. I would advise you to create a folder like /usr/local/android-studio
and unpack the file there (note that you'll need sudo rights to do it).
Otherwise you can unpack it somewhere in your home
folder, also an option if you do not have sudo rights. Here it does not really matter where, you may create a folder like ~/software/android-studio
for convenience.
Read more about the Linux directory structure.
Ok, let me state clear, there's an appropriated place to place stuff, but in this case, simple is the best, so I prefer any location where you already have write/read permissions, like you $HOME
directory.
Take from the instructions
Linux:
- Unpack the downloaded Tar file, android-studio-bundle-.tgz, into an appropriate location for your applications.
- To launch Android Studio, navigate to the android-studio/bin/ directory in a terminal and execute studio.sh.
- You may want to add android-studio/bin/ to your PATH environmental variable so that you can start Android Studio from any directory.
Resuming in easy steps:
mkdir ~/android-sdk && cd ~/android-sdk
wget http://dl.google.com/android/studio/install/0.4.2/android-studio-bundle-133.970939-linux.tgz
tar xf android-studio-bundle-133.970939-linux.tgz
export PATH="~/android-sdk/android-studio/bin/:$PATH"
studio.sh
If you want to make them permanent:
echo 'export PATH="~/android-sdk/android-studio/bin/:$PATH"' >> ~/.bashrc
or .zshrc
. Depending the shell you use. Done. You can use whatever path you like, just try to do not interfere with other software.