I have spun up a VM of OS X since my main user is not an admin and I need to do things that require admin access.

My end goal is to install the Xcode command line tools into a VirtualBox VM I created with OS X 10.11. Is there a way to do this?

I tried to run xcode-select --install, but I got this error:

'xcode-select' is not recognized as an internal or external command, operable program, or script file

But I get the same error (with the command name different) when I ran the whoami, scp, and clear commands. I get an error No current directory specified when I run the ls, and cd commands.

What can I do to narrow down the cause of these terminal errors inside my VM?

  • Massive amounts of breakage in that VM. We might need to close this and walk away from it - perhaps asking a follow on question how do I troubleshoot a VM where these 5 commands return the same message - what does "XYZ" error mean. Caleb - can you edit this info into the question: What version of VBOX? What is the guest OS version/build as well as the host OS version and build. sw_vers will get you the builds...
    – bmike
    Commented Dec 18, 2015 at 19:42
  • What does "...created with OS X 10.11" mean? Host and guest OS are 10.11?
    – klanomath
    Commented Dec 18, 2015 at 20:18

1 Answer 1


I would spin up a second VM taking careful note of the version of the installer you used to build it up (or document from where you got the VM image). For example, the Install OS X El Capitan installer dated October 12, 2015 installs build 15B41a of the OS.

After the first boot, document which command-line tools are broken. You don't need to sign in to the app store or install Xcode to run xcode-select --install as that should be bundled with the core OS.

As I commented, massive amounts of breakage is present if the following commands don't run:

  • ls
  • whoami

You can run the type command to make sure you at least have a viable set of these commands:

mac:~ me$ type ls
ls is /bin/ls
mac:~ me$ type xcode-select
xcode-select is /usr/bin/xcode-select
mac:~ me$ file `which ls`
/bin/ls: Mach-O 64-bit executable x86_64
  • Same exact issues as before. What do you mean by version of installer? Commented Dec 18, 2015 at 20:08
  • @CalebKleveter what did you get for the lines checking ls?
    – mmmmmm
    Commented Dec 18, 2015 at 20:25
  • I asked my brother about the issue, and he asked "Did you log into the VM?". I think my real question, is how do I create and run a VM? I think I'll ask on SuperUser, unless you say here is okay. Commented Dec 21, 2015 at 15:44
  • Here is just fine to ask. SU is fine too - just don't ask the exact same question on both sites. That is frowned upon and usually you want to ask a question tailored for the audience on either site.
    – bmike
    Commented Dec 21, 2015 at 18:21
  • @CalebKleveter Also search here as that has probably been asked before
    – mmmmmm
    Commented Dec 21, 2015 at 19:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .