Ask HN: How to learn command line?
I've done a decent amount of front-end coding (html,css,jquery) and some backend (php). But I never took the time to learn how to use the command line.
Should I? Where do I even begin?
Should I? Where do I even begin?
16 comments
[ 3.1 ms ] story [ 51.0 ms ] threadI would say install a simple, stripped down Linux distro on a computer and try to use it for everything. Necessity is the best motivator to learning in my experience. You can start off with Gnome, but if you want to force yourself to learn the command line better, install something more lightweight (like enlightenment, or openbox) and then figure out how to configure it and try and do work from there.
If you don't have a box you can put Linux on and can use, find a super cheap Linux VPS (search around on lowendbox.com) and then follow a tutorial on setting up a simple server. Then you can do an email server, try using it as a torrentbox, etc. This may even be a better option, because it will be a place you can put up your other work. It's only a couple bucks a month, and once you've got things figured out, try doing more with it. Switch from Apache to nginx, for example.
The key is simply spending time on the command line, then you will be able to get comfortable with it. Also, there are many, many great tricks that you can learn if you know someone who is good at using Unix command lines and shells simply by watching over their shoulder. Some of the most valuable tidbits I have learned have been when someone saw me do something the hard way, then taught me a better way to do it (it took me a long time before I learned about tab completion, for example).
[1] http://opensource.weblogsinc.com/2006/06/20/my-new-book-linu...
[2] http://peepcode.com/products/meet-the-command-line
YMMV.
The real problem is that Windows skills generally are only transferrable to other versions of Windows whereas Unix command line tools - be they GNU or BSD - are. And even that's not entirely true. If there's a Windows command-line tool that you learn about and like I guarantee you it's based on a Unix command-line tool that has a man entry.
I made the switch to Linux a few years ago for servers, only months ago for my primary workstation, and I'd never go back to Windows; though Windows with cygwin is close enough to Linux to make a very nice workstation.
That's not much of a reason to use Cygwin in lieu of Powershell.
I really only started working with the command line after I started working on a Django project about 3 or 4 years ago, and I was constantly frustrated by the inefficiencies of the GUI tools. I needed to script commands and repeat them over and over.
Learn a powerful scripting language, instead (Python, Lua, ecc.).
Oh, and since for basic tasks you will be using the command-line anyway, if you are using *nix, please use one designed to be used by humans, that is, Fish: http://en.wikipedia.org/wiki/Friendly_interactive_shell