An intro to the OS X command line (eddywashere.com)
almost 8 years ago from Eddy Hernandez, UI Engineer at ScaleFT
almost 8 years ago from Eddy Hernandez, UI Engineer at ScaleFT
Hoping this is helpful to anyone who has tried using the command line and felt lost or someone looking to brush up on the basics.
There’s no word in the article about bash (the piece of software that powers Terminal app) and all its available commands.
Yep. I had a section about shells, the default (bash), and was going to suggest switching to zsh. It was all kind of too much for an introductory post but definitely something I plan to add. But it maybe wise to just add a link to all the available commands in case someone is interested in learning more. Thanks for the feedback!
I think it's also worth knowing some of the basic grammar of the command line too.
.
means The Current Directory. Thus you can open .
to open the current directory in Finder, subl .
to open the current directory in Sublime Text, and so on.
..
means The Parent Directory. So you can cd ..
to move from /directory/subdirectory/subsubdirectory
to /directory/subdirectory/
~
means your User Directory. For me, typing cd ~
takes me to /Users/jodi
. This is handy because there are lots of useful files and directories in here.
You should also be able to Tab-complete directory and file names as you're typing them. So when I'm in my home directory, I can type cd S
and hit TAB. It will autocomplete to cd Sites/
. I'm sure you can imagine how handy this is for long filenames.
If you find yourself doing a lot of command-line work, look into Prezto - it's a more advanced but lighter version of the popular oh-my-zsh package.
I also make a lot of use of z. It helps you very quickly navigate to often-visited directories.
Great tips! I'll try to add some of these to the post.
Don't forget that if a single tab doesn't show anything, because there are multiple files starting with those characters, press tab twice to see all files/folders that start with those characters. Then, type in the remaining characters until you're able to tab-autocomplete it.
EDIT: To echo what another commenter on your site said, you should warn how deadly cp, rm, and mv can be.
Designer News
Where the design community meets.
Designer News is a large, global community of people working or interested in design and technology.
Have feedback?
Login to Comment
You'll need to log in before you can leave a comment.
LoginRegister Today
New accounts can leave comments immediately, and gain full permissions after one week.
Register now