Live data from Hacker News

Ask HN: how did you learn the command line?

news.ycombinator.com

21–30 of 59 posts

Re: Ask HN: how did you learn the command line?

#21
My Windows laptop was outta commission for a few weeks in college. I could use the public computer labs to do my homework, but the only way I could do any programming was to SSH into remote UNIX boxes that I had access to and write the code directly on the server. (I was doing mostly PHP development at the time, and had laboriously setup PHP/Apache/MySQL on my Windows box until it died.) When your only window into the world is an SSH terminal, you pick up the command line and vim fairly quickly.

Re: Ask HN: how did you learn the command line?

#25
Know how to get help with specific topics.

(1) At the terminal, via

    man 
or

    apropos 
and (2) online by googling.

These are useful when you have a specific task you want to get done, not so much otherwise. Therefore,

(3) Try to do things at the command line that you would normally do via mouse. If you have no idea how, google or 'apropos'. If you learn of a tool and have no idea how to use it, google more or 'man'.

(3a) Do the simple stuff via the CLI--removing and moving files, examining directory contents, et cetera. (Be careful with rm! It will not warn you by default.)

(3b) More complex stuff too--try editing text with a terminal editor. Many people swear by emacs and vim. They have learning curves of their own but they are worth it. Pick one.

(4) Pipes and input redirection. Send the output of one command as the input to another, send the output to a file, etc. This is where your standard Unix shell gets really powerful.

Re: Ask HN: how did you learn the command line?

#26

I remember at age five being taught by my dad how to run DOS games. Type 'cd ' and press tab. 'cd' is like clicking on a folder.

Exactly the same for me, before I could read, write or speak english. My dad gave me a list of commands.

It was a bit hard to get out of the station in police quest and only years later did I understand why my dad didn't want to help me to get into this game where a "man" is floating from left to right and you need to answer a question to play.

Re: Ask HN: how did you learn the command line?

#27
The first computer my family owned was an IBM PC XT, which was my introduction to the concept of a command line interface being normal. I do wonder what it'll be like for the generation of potential hacker types who won't even remember a world before slick iOS UIs and ubiquitous internet in your pocket. Computers were a kind of source of wonder for me in my childhood, and what I see from young children today is they view them as very mundane, which I suspect hurts their curiosity.

Years detached from those experiences with the XT, I picked up Linux in the late 90s. It was a bit of a learning curve from DOS. But I picked up some very dated book at the local library about Unix and it kind of set me straight.

The real revolution in my thinking came in 2001, when I was unfortunate enough to buy a motherboard with an ALI 1647 chipset (it's sad that I have brain cells devoted to remembering that model number). That chipset, when combined with an NVIDIA video card, would make X crash and lock up after about 30 minutes of use (before you start bashing on Linux, I'd been told the same thing would happen on Windows with this hardware combination). For six months months I was in denial of this problem. I kept thinking the next BIOS update or the next driver would fix the problem. In the meantime I used nothing but console mode, because it was the only thing that was stable.

Six months or so later I sold the old motherboard, paid my quarter to get myself a "real motherboard" (ok, it was more like USD$200), and got X working again. It was good and all to have a GUI again but one thing I did notice was that my command line skills were much improved.

Re: Ask HN: how did you learn the command line?

#28

I came to answer your question and say that when I started computing there was only the command line - there were no windows, effectively no graphics, and the only thing you could do was type commands. But then you ask if there are tutorials, and that I can't help you with. Having said that, I tried this search: http://www.google.co.uk/search?q=command+line+tutorial and I got lots of hits, including these: * http://w…

What he said. It seemed a good idea at the time, considering that, back then, the alternative to a CLI on a 80x24 monochrome terminal were decks of punch cards, featuring 30-60 minutes turnaround time, with output on greenbar paper.

Besides, VMS had a pretty nice "help" command. Barely had to crack open any of the orange binders in the 10 feet or so shelf of manuals.

(For entertainment purposes only. Do not attempt this at home. Get off my lawn ;-)

Post reply on HN