Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch command line tools on MacOS

I installed two commmand line tools on my mac. So I want to switch command line tools. How I can do it?

I tried switch from Xcode preferences > Locations > Command line tools. However, Command line tools beta 1 for Xcode 10 is not appear on this menu.

Xcode 9.4 is installed on my mac.
macOS 10.13.5

  • Xcode 9.4 command line tools (bundled with Xcode9.4, it installed at /Applications/Xcode.app/Contents/Developer)

  • Command line tools beta1 for Xcode 10 (not bundled with Xcode, it installed at /Library/Developer)

like image 617
KiYugadgeter Avatar asked Jun 05 '18 12:06

KiYugadgeter


2 Answers

Use this command in terminal to switch xcode:

sudo xcode-select -s /Applications/Xcode-beta.app 

See: https://medium.com/@maximbilan/switch-command-line-tools-to-xcode-beta-2e99c54cb147

like image 182
KMR Avatar answered Sep 20 '22 06:09

KMR


call Xcode.app like this:

sudo xcode-select -s /Applications/Xcode.app

if you're downgrading from Xcode Beta version

like image 45
Apatoallo Avatar answered Sep 22 '22 06:09

Apatoallo