How to add a command line utility in Terminal
Today I downloaded a command “class-dump“, but had no frig’n idea how to “install” it. What I did was I downloaded the file, expanded it and double clicked on the executable Terminal file, and a Terminal window popped up showing the usage of the command, and automatically logs out.
I tried executing the command in Terminal, and I got the error message “-bash: command not found”. I moved the directory to where ‘class-dump’ is located, and tried to execute there, and it failed for the same reason.
I googled “install shell command” “install unix command” and tons of other terms, but nobody included a dumbed-down, step-by-step instruction on how to do it.
So here’s how I finally did it-
go to Finder, menu bar “Go to Folder”, 
and type in /usr/bin.
Here you’ll see all other commands. Then just copy and paste the file in here. It may tell you that you do not have permission to modify bin, and if that happens, click “authenticate”, and type in the administrator’s (my, in my case) password. Then go back to Terminal. You’ll be able to execute the command from any directory. It’s that simple.




