Mac: How to Open Android Studio from Terminal


As a developer, we all tend to work a lot on the Terminal, and it's much easier to open an application via the Terminal. If you want to open Android Studio from the Terminal, you can make use of the open command followed by the path of the app from the Applications folder.

Example:
open -a /Applications/Android\ Studio.app
Open Android Studio from Terminal

If you frequently open this app via the terminal, more easier way is to create an alias for this command and store it in .zshrc/bash_profile file.

Open ~/.zshrc file and create an alias.

nano ~/.zshrc

Add the below lines,

alias android-studio='open -a /Applications/Android\ Studio.app'

Now it makes it much easier, all you need to do is type in android-studio in the Terminal and you have the app open!

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org



















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap