13

I've just installed Android Studio. After installing, I forgot to add in the launcher. I restarted the system.

Now I want to launch Android Studio from Terminal. I've tried everything but didn't work.

8 Answers 8

14

cd into the directory where you unzipped the android studio installer zip file. The folder is named android-studio. It could be in your ~/Downloads folder if you downloaded it from the internet. Now cd into the bin folder and run the studio.sh file

./studio.sh
2
  • can you please give me the commands.i am new on ubuntu
    – Saad Mirza
    Oct 30, 2016 at 16:42
  • if your extracted zip file path is PATH_TO_ZIP_FILE, then type PATH_TO_ZIP_FILE/android-studio/bin/studio.sh . For example if the android-studio folder is in downloads directory type $HOME/Downloads/android-studio/bin/studio.sh Oct 30, 2016 at 16:50
6

On ubuntu it is /opt/android-studio/bin/studio.sh

You can open terminal by CTRL+ALT+T

4

just run this command into your terminal

cd /usr/local/android-studio/bin

/usr/local/android-studio/bin$ ./studio.sh

0
2

option 1 : set path alias in bashrc file by echo command

echo "alias android='/usr/local/android-studio/bin/studio.sh'" >> ~/.bashrc
source .bashrc

option 2 : set path alias by opening bashrc file.

open bashrc file on nano editor

nano ~/.bashrc

paste this text in bashrc file

alias android='/usr/local/android-studio/bin/studio.sh'

ctrl + S to save file . Ctrl + X to exit.

finally source it

source ~/.bashrc

To run android studio, you need to type only

android
0

If you want to use terminal to start a program then you should be knowing the command to be written in terminal. To know the command in Kubuntu I use the Kmenuedit. In kmenuedit find that program and that program's details there will be a field named command there you will find text to be written in terminal. Another option is to check system monitor program that also has a column named command. So you can check running instances of programs and command.

0

Go to android studio folder in your system then 1. Press right click of mouse and open terminal 2. wright ./studio.sh and press enter 3. it would open your android emulator in ubuntu

0

Launching Android Studio using Terminal with SUDO privileges

  1. Open terminal (ctrl + alt + t)
  2. Type sudo su command then enters your password.
  3. Type cd /opt/android-studio/bin
  4. Run Android studio using sh ./studio.sh
0

I tried to reduce job by setting an environment variable

echo "alias android_studio=/usr/local/android-studio/bin/studio.sh" >> ~/.bashrc
source .bashrc

Whenever want to open Android Studio just fire command

android_studio

I hope this will reduce your work.

Good luck..!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .