Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Big Ron

macrumors 6502
Original poster
Dec 7, 2012
419
106
United Kingdom
Whenever I read posts I am always impressed when someone offers a terminal command that fixes a problem. Cudos to those who know such commands. What I was wondering was: Are these commands learned over many years of Mac ownership? Are they only available to a select few who dare to envoke them OR is there a central repository, where they are all listed, that I could explore for myself.

Ideally could anyone suggested a TRUSTED link where these commands are listed, preferably with examples of their correct usage?

Thnaks in advance
 
Sure. Open Terminal. Type "help" and a list of commands will be presented. Type man -k <command> (eg "man -k mkdir"), and help for that command and its options will be displayed. You could also look here on this site: http://guides.macrumors.com/Terminal

Personally I use and document a few terminal commands for specific purposes, those that use it daily and/or professionally will learn it much as any other language.
 
  • Like
Reactions: laurihoefs
Sure. Open Terminal. Type "help" and a list of commands will be presented. Type man -k <command> (eg "man -k mkdir"), and help for that command and its options will be displayed. You could also look here on this site: http://guides.macrumors.com/Terminal

Personally I use and document a few terminal commands for specific purposes, those that use it daily and/or professionally will learn it much as any other language.

Thanks simonsi for a speedy reply. I am happy to 'dip my toe in the water' as they say on a 'need to' basis but a central TRUSTED 'go to' reference is perfect.
 
Just google unix commands there are a few sheets out there that list a vast majority. The terminal is the best place to be if you want to just get administrative stuff done. I have total terminal installed on the various Macs I use set it to drop down and close with opt-space it's handy. The best way IMHO to start leaning the command line is to do simple things with it first like updating (sudo softwareupdate -i -a) get used to that then expand out.
 
Are these commands learned over many years of Mac ownership? Are they only available to a select few who dare to envoke them OR is there a central repository, where they are all listed, that I could explore for myself.
Others have provided links so I will just state the following here. OS X is based on UNIX. Apple just provides a slick, proprietary GUI that sits on top of UNIX (with some of it's own modifications).

UNIX has been around since the early 1970s.

Think of it in the same way as Windows 95/98/2000 sat on top of MS-DOS.

Terminal commands are simply UNIX commands. If we stripped out the OS X GUI, Terminal would be how you would interact with the computer.
 
  • Like
Reactions: bobr1952
Just google unix commands there are a few sheets out there that list a vast majority. The terminal is the best place to be if you want to just get administrative stuff done. I have total terminal installed on the various Macs I use set it to drop down and close with opt-space it's handy. The best way IMHO to start leaning the command line is to do simple things with it first like updating (sudo softwareupdate -i -a) get used to that then expand out.

I always have a Terminal open and the command + tab keys at the same time brings up the application switcher so you can quickly use another command still held down then tab to move to the desired application. If mouse is in my hand then the thumb button I have mapped to it brings it up for a quick switch to a running app. To the OP a quick Google search on what you want to do plus command line OSX on the end will usually bring up more than a few hits on how to get done what you need.
 
Thanks to all - Although not a 'Mac newbee' I have deliberately stayed away from Terminal commands because I'm not 100% sure. As lowendlinux suggested: I will start small.
 
Thanks to all - Although not a 'Mac newbee' I have deliberately stayed away from Terminal commands because I'm not 100% sure. As lowendlinux suggested: I will start small.

Definitely start small and if you are going to be playing around with files do your commands on copied to another location ones. This way if you mess it up at least you still have the originals to fall back on.
 
I use Windows at work and OS X at home.
On both I have a Terminal window up always (Command Prompt & Terminal, respectively).

It's a matter of deciding you're going to do something with Terminal instead.
Daily, I mostly commonly use lftp for file transfers, wget for downloading from web sites, screen to shove things in the background, rtorrent for bittorrent, cd, mv, cp, mkdir: all for file/directory managment, ln to create symbolic links, ffmpeg for video encoding, as well as a bunch of alias' that allow me to unrar files and connect (ssh) to other Apple device Terminals.

(Think of approaching keyboard shortcuts the same way, which are so much more productive than the mouse)
 
Ideally could anyone suggested a TRUSTED link where these commands are listed, preferably with examples of their correct usage?

Here are the official "man" pages for each command available. If you click each command it will explain what it does and the options available for each, along with examples.

Much of what I have learned has been on forums like this. Some was self taught from just wondering if a certain task could be performed, then doing the research to answer my own question.
 
  • Like
Reactions: CoastalOR
The O'Reilly Unix for OS X book is decent since it covers a lot of Mac OS X specific CLI commands.

But OS X shell is a lot easier to understand if you have a foundation in *nix to begin with.

I recommend the following two O'Reilly books:

Essential System Administration by AEleen Frisch
Learning the bash Shell by Cameron Newham
 
  • Like
Reactions: bradl
And be absolutely sure you have a backup of your disk BEFORE you try playing around with terminal commands. It is very very easy to get a parameter wrong and wind up with a disk that will not boot, especially if you try changing permissions. When I was working with *NIX, I remember newbies just out of college with CS degrees who would come in and say "I know a better way to do this" and proceed to wreck things. Since I had backups, I let them go ahead and learn the hard way.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.