#!/bin/bash echo "Killing xcode..." kill $(ps aux | grep 'Xcode' | awk '{print $2}')
How to kill Xcode from the command line
June 28, 2012
iOS, unix ios, ipad, iphone, xcode 8 Comments
A blog about creating valuable software
June 28, 2012
iOS, unix ios, ipad, iphone, xcode 8 Comments
#!/bin/bash echo "Killing xcode..." kill $(ps aux | grep 'Xcode' | awk '{print $2}')
Jun 28, 2012 @ 13:50:45
Another option could be ‘killall Xcode’ on a Mac or ‘pkill Xcode’ if you’re on Linux.
Jun 28, 2012 @ 15:38:06
Nice Adam! Didn’t know about that – thank you.
Nov 09, 2016 @ 05:11:13
Thank you!
Jul 04, 2012 @ 08:12:25
killall Xcode will fail if Xcode is not running (which may or may not matter), so I usually use Applescript to do this:
osascript -e ‘tell app “Xcode” to quit’
Jul 04, 2012 @ 08:13:36
Actually, it’s usually this, because I need to kill the simulator before running my unit tests!
osascript -e ‘tell app “iPhone Simulator” to quit’
Jul 04, 2012 @ 13:01:21
Very nice Stuart. I’ve not used Apple script before – but it looks nice.
Thanks for the tip. Going to check this out.
Jan 28, 2016 @ 17:10:24
Nice. It doesn’t do anything if you need to force-close, unfortunately.
“kill xcode from command line” Code Answer – My Blog
Apr 14, 2022 @ 02:27:45