0

I am about to install android studio in Ubuntu 16.04 LTS . I was going through google's official documentation which you can check Here

In the above article it is said "Unpack the .zip file you downloaded to an appropriate location for your applications, such as within /usr/local/ for your user profile, or /opt/ for shared users."

I tried to search where this /usr/local/ & /opt/ directories exist but couldn't get it properly .The reason for searching it because I want to be assured that after installation it won't create any problem regarding space as we know android studio with its virtual devices , SDKs etc take space more and more with every update ,so then I thought what If I try to install same in my home directory which is /home/<myusername> ,I searched about it and got an article regarding it Here which says yes you can install it if you don't have sudo permissions .I want to clear that I am the single user of my system and I have dual boot installed (win 7 + Ubuntu 16.04) , So my questions are as follows :

  1. Can I install it at /home/<myusername> directory like /home/<myusername>/Documents and will it be safe and won't create any problem later ? Because I am thinking/interested to install it there due to more free space !
  2. What are the drawbacks (if any )for installing it at home directory ?
  3. would it be better to install android studio at /usr/local/ directory than /home/<myusername>/xyzdirectory directory ,If yes why ? I am asking this because I found its recommended for single user installation at different places .

  4. Where these /usr/local/ & /opt/ directories actually exist ?

I know my last question may seem a bit irrelevant but I am asking because the query is related to this specific installation .

Following is my total space if you like to check it for directories :

directory space screenshot

Thank you!

1 Answers1

1

I would always go for /opt/ for 3rd party software.

The tar file has all the permissions set for the contents of the file and all you need to do is (probably) copy a file into the system so you can directly start it (either an executable or a service).

/opt/ has an added security: it will always be set up for the "root" user so your own users can not mess with it and your admin account does not have to alter anything in there. Just unpack it and read the readme inside the directory to see if anything else is needed.

Can I install it at /home/ directory like /home//Documents

Sure but most of these install files that prefer /opt/ are created with permissions and a special user for this. Putting it elsewhere does not matter but you might issue a command inside /home/ that changes the permissions of this install making it possible to kill it.

This is just about the installer. Your projects should be in your /home.

Rinzwind
  • 299,756
  • thanks for responding ,I just update my question a little bit more can you please recheck and respond ,thank you! (I'm a single user ) – user716691 Apr 16 '18 at 09:37
  • I first installed android studio at windows 7 and found that its sdks and virtual devices eat a lot of spaces for different versions so will it not take same space here at ubuntu ? I mean I don't know where this /opt/ directory exist so not clear about space ,you can check my space through my post ,I have posted a screenshot regarding it or I should not worry about space and should go for /opt/ directory ? ,sorry but I am just a beginner so please clear it to me ,thankyou! :( – user716691 Apr 16 '18 at 09:43
  • /opt/ is generally part of /. Otherwise it has its own partition. But put your own data on your /home or an external device. Linux works differently, in Windows you install similar software; in Linux we tend to not to do that – Rinzwind Apr 16 '18 at 09:54