- Paste the following scipt in your .bashrc file if they doesn't exist.
# ~/.bashrc
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
- Commands to paste the script
$ nano ~/.bashrc
$ # Now copy the three export commands
$ # paste them at the end of file
$ # press [ctrl + x] then [shift + y] then [enter].
$ source ~/.bashrc # reload the ~/.bashrc config
- Commands to open emulator
$ # List available avds using
$ $ANDROID_HOME/emulator/emulator -list-avds
$ # If no devices found open android studio and create one.
$ # In my case I have Nougat avd to launch it simply do
Nougat
$ $ANDROID_HOME/emulator/emulator @Nougat &
once it is launched press [ctrl + c]