Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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://www.davidbaumgold.com/tutorials/command-line/

* http://stackoverflow.com/questions/8170/best-windows-command...

* http://www.tuxfiles.org/linuxhelp/cli.html

I'm not a beginner on the command line, so I can't assess how well they meet your needs.



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 ;-)


Me too, that's all there was. And that may be the answer: only allow yourself the command line for longer and longer periods of time. Force yourself to learn it.

I really like this book, even today: http://shop.oreilly.com/product/9780596003302.do

The key to being proficient at the command line (as distinct from writing shell scripts) is to think of it as composition.

For example, run this:

  $ file $(which $(man -k python | cut --delimiter " " --fields 1))
(The first '$' is your command line prompt, yours may differ; you don't type that. The other '$' characters you do type.)

Now run each command from the inside out, starting with the man command. See what each command does. Build it up bit by bit, that's exactly what I did, like this:

- the man command

- the man command piped into the cut command

- the man command piped into the cut command after reading "man cut" to remember about the --delimiter option

- the output of that pipeline fed to which

- the output of which fed to file

Note that I didn't use any for loops or variables, the shell did the right thing for me.

Read the man pages for each of those commands.

set -o vi or set -o emacs (or their equivalent in .inputrc) helps a lot when you compose things incrementally. esc-k k k (etc) is your friend if you set -o vi.

Read man bash. It will take you a long time. For today, read the section on READLINE. While in man bash, search for the word READLINE at the front of the line, like this:

/^READLINE

Slash = search

^ = anchor the search to the front of the line

READLINE = what you're searching for in the current man page.

For now, all you need in your ~/.inputrc file is:

set editing-mode vi

This will give you vi command line editing in bash, as well as any other program that uses readline, like the python REPL.

For more info on .inputrc,

  $ man readline
which is documentation for the C interface to readline, but is mostly about how readline is used by a user. For example, in man readline

/VI Mode bindings

gives you all your command line editing commands when you use vi mode.

Get a mostly table of contents of man bash, for your searching pleasure:

  $ man -P cat bash |egrep -v "^ " |egrep -o "^[^ ]+"
Sort it:

  $ man -P cat bash |egrep -v "^ " |egrep -o "^[^ ]+" |sort


And ...

I realized/remembered while reading the other comments that knowing what's available is a necessary part of "just use the command line a lot."

So try this, to get a good list of what's available (and for more command line composition)

  $ man -k $(ls -1 /usr/bin |egrep -v "\[") 2>&1 |egrep -v "nothing appropriate"
See if you can figure out what 2>&1 does (it's a very common idiom, probably easy to find), and figure out why it's needed here.

That's a long list of stuff, look at it a page at a time:

  $ man -k $(ls -1 /usr/bin |egrep -v "\[") 2>&1 |egrep -v "nothing appropriate" |less
That's still a lot of stuff, save it off in a file in your home directory for later:

  $ man -k $(ls -1 /usr/bin |egrep -v "\[") 2>&1 |egrep -v "nothing appropriate" > ~/wholelottacommands.txt




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: