Start appium server from terminal on MAC Machine

start appium server from terminal on MAC Machine

Is it a question?


yes, you are right? I am able to launch Appium UI through terminal but when I try to start Appium server through Terminal. I am not getting success. Can you share the steps as well as code so That I could go ahead.

do first in terminal:

brew install node # get node.js
npm install -g appium # get appium
npm install wd # get appium client


/Applications/ /Applications/ --address --chromedriver-port 9516 --bootstrap-port 4725 --no-reset --local-timezone --command-timeout 7200 --session-override --debug-log-spacing --platform-version 9.0 --platform-name iOS --app /Users/chennareddy/u/apps/TestApp/build/release-iphonesimulator/Handstand/ --show-ios-log --device-name iPhone-6s --native-instruments-lib --orientation Portrait

I have installed Appium via this command successfully. but when I hit “appium” on terminal it gives
below response.
$ appium
-bash: appium: command not found.
Can you help with this?

1 Like

@Chhavi_Singh have you installed appium via npm? “npm install -g appium”
If not, then install it with npm and open new terminal… type “appium”

I have installed via “npm install -g appium” and it successfully installed… after than I enter appium on terminal… it prompt “command not found”

Open a new terminal and cd /usr/local/bin/ and check if appium executable present there?

but I have used “/Users/xxxxxx/.npm-global/lib/node_modules/appium/build/lib/main.js”. Is it the same thing?
Actually I want to start the appium programmatically…

/usr/local/bin/appium is your soft link to this “main.js”, this soft link would get created automatically when we install appium using npm. Anyways, you can try re-installing appium:
Uninstall command: “npm uninstall -g appium”
Install Command: “npm install -g appium”

1 Like

:frowning: no luck.
PFB logs.
administorsmini:~ chhavi.singh$ npm uninstall -g appium
removed 535 packages in 14.067s
administorsmini:~ chhavi.singh$ npm install -g appium
/Users/chhavi.singh/.npm-global/bin/appium → /Users/chhavi.singh/.npm-global/lib/node_modules/appium/build/lib/main.js

[email protected] install /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/appium-chromedriver
node install-npm.js

info Chromedriver Install Installing Chromedriver version ‘2.38’ for platform ‘mac’ and architecture ‘64’
info Chromedriver Install Opening temp file to write chromedriver_mac64 to…
info Chromedriver Install Downloading
info Chromedriver Install Writing binary content to /var/folders/18/mn57ht2n65d987s_d25rx5mc52kmmy/T/2018425-8105-1brxsw5.k3lh/…
info Chromedriver Install Extracting /var/folders/18/mn57ht2n65d987s_d25rx5mc52kmmy/T/2018425-8105-1brxsw5.k3lh/ to /var/folders/18/mn57ht2n65d987s_d25rx5mc52kmmy/T/2018425-8105-1brxsw5.k3lh/chromedriver_mac64
info Chromedriver Install Creating /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac…
info Chromedriver Install Copying unzipped binary, reading from /var/folders/18/mn57ht2n65d987s_d25rx5mc52kmmy/T/2018425-8105-1brxsw5.k3lh/chromedriver_mac64/chromedriver…
info Chromedriver Install Writing to /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver…
info Chromedriver Install /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver successfully put in place

[email protected] install /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/appium-selendroid-driver
node ./bin/install.js

dbug AndroidDriver Getting Java version
info AndroidDriver Java version is: 1.8.0_171
info Selendroid Ensuring /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download exists
info Selendroid Downloading Selendroid standalone server version 0.17.0 from → /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download/selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d82.jar
info Selendroid Writing binary content to /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download/selendroid-server.jar.tmp
info Selendroid Selendroid standalone server downloaded
info Selendroid Determining AndroidManifest location
info Selendroid Determining server apk location
info Selendroid Extracting manifest and apk to /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download
info Selendroid Copying manifest and apk to /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid
info Selendroid Cleaning up temp files
info Selendroid Fixing AndroidManifest icon bug

[email protected] install /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/fsevents
node install

[fsevents] Success: “/Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node” already installed
Pass --update-binary to reinstall or --build-from-source to recompile

[email protected] install /Users/chhavi.singh/.npm-global/lib/node_modules/appium/node_modules/heapdump
node-gyp rebuild

CXX(target) Release/
SOLINK_MODULE(target) Release/addon.node

  • [email protected]
    added 535 packages in 136.742s
    administorsmini:~ chhavi.singh$ appium
    -bash: appium: command not found
    administorsmini:~ chhavi.singh$

As per logs, your soft link is created in this path “/Users/chhavi.singh/.npm-global/bin/appium” , So now you can add “/Users/chhavi.singh/.npm-global/bin/” in your bash profile and then open new terminal and try running appium. It will work.

Thanks for the help… It is resolved now…

most wc!
for updates and learnings on Appium, subscribe this youtube channel:

Hi @Swapan_Chhabra

Thanks for you help.
It helped me to resolve my issue also to start my Appium from Terminal.


resolve by uninstalling and again installing with using --force

Unable to install appium

32 vulnerabilities (24 moderate , 3 high , 5 critical )

To address issues that do not require attention, run:

npm audit fix

To address all issues possible (including breaking changes), run:

npm audit fix --force

Some issues need review, and may require choosing

a different dependency.