Extremely useful commands for the Terminal warrior in Mac OS X, or "Look Ma, no GUI!"

This is a list of some commands (to be used form the terminal) to do very useful things in Mac OS X:

system_profiler it will give you all the information about your mac that you would get from the About this Mac -> More info menu but through the command line

hdid foo.dmg mounts a dmg package to your file system from the command line. For installing stuff remotely.

sudo installer -verbose -pkg foo.mpkg -target / to install the above mentioned mounted package from the command line.

mount Will give you a list of mounted drives so you can find the correct number for the dmg package you just mounted.

diutil detach /dev/disk*s* -force unmounts the previously mounted dmg package. Substitute the * for the right numbers.

sudo /Developer/Library/uninstall-devtools -more-all gets rid of your Xcode installation from the command line.

srm foo.* to erase something that should stayed erased.

softwareupdate Yes, you can update your system software (OS updates and other Apple apps) from the command line.

That is it for now, have fun!

Postpublication:

dns-sd -B _ssh._tcp . poll the local network for bonjour-know ssh-enable computers via command line. Works with Macs only, as far as I know.





Comments

Popular Posts