Live data from Hacker News

Ask HN: how did you learn the command line?

news.ycombinator.com

31–40 of 59 posts

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

#31
When I was 16, I got my first VPS box. The hoster only offered SSH connection, so the shell was the only way to proceed. Spent half a year without knowing about '&' and 'nohup' and 'Ctrl-Z', but learned what patience actually is. Then watched the video course on Vim by Derek Wyatt.

There's a small book about shell by Zed Shaw, recommended: http://cli.learncodethehardway.org/book/

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

#32
My solution isn't the easiest because it requires a lot of discipline but it you force yourself to stick to it you will come to dominate the command line.

Everytime I wanted to do something in the command line as well as everytime I had to do something in it, I would then write down what the command was in a text file as well as my understand of what the command did.

If you program a keyboard shortcut to launch the text file with but one keystroke it's a not as bad as it sounds.

The reason I did this was because I would always enter a command and totally forget it and then need to look it up again and so I forced myself to stop wasting time by compiling my own command line glossary.

If you are new to UNIX, don't go poking around the MAN pages because you'll be lost, discouraged and less likely to acheive your goal of terminal excellency.

It's really not something you can just pickup overnight unless you're very very diligent and proficient with another language and very familiar with all things computers. If you can take a Unix course some where in person, do that. always the best to have a pro help you out while you're starting.

And one last point of particular importance. Respect the Sudo. I can't tell you how much frustration I endured while messing with the sudo--it's not a good thing to be bushwhacking no the command like as the root user which I did at first because I am just a curious kid and didn't know any better.

My advice is to abstain from messing with things like the ACL, file ownership, and the wheel group until you know the hierarchy cold.

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

#33
The greatest obstacle for me was knowing which tools did what. Many things I wanted to do in the shell I did not know were possible, and even Google is of limited value when your query is necessarily vague, though this has gotten a whole lot better in recent years.

Have an IRC connection to Freenode open so you can ask about these sorts of things that are more easily understood by humans (#bash, ##linux, ##workingset are good channels to be in). If you're really lucky, you have some knowledgeable mentor around who doesn't mind you asking them about the best way to perform some task (I was not so blessed).

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

#34
I bought a couple of Sam's Teach Yourself books:

-Sam's Teach Yourself Unix in 24 Hours

-Sam's Teach Yourself Shell Programming in 24 Hours

These won't make you a shell genius immediately, but they'll create a good basis for future, specialized learning.

Also, I try not to be a material snob, but buying the book instead of using a website or .pdf file made a world of a difference (especially during a morning commute).

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

#36
I seem to be one of the few people to have learned from a class. Over a semester, I learned all the important commands, and commands I probably have otherwise learned, like uniq -c, dmesg, or cut (although I can't imagine ever actually using awk), as well as the bash scripting language and syntax.

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

#38
I cut my Linux teeth on Gentoo stage 1 and 2 installs, which I found enormously frustrating and equally educational.

Today, I'd recommend working through Linux From Scratch. You'll develop a rich understanding of how a UNIX-like OS fits together, including a fair bit of shell functionality: http://www.linuxfromscratch.org/lfs/

My favourite dead-tree UNIX book would be UNIX Power Tools, 3rd Edition (http://www.amazon.com/Power-Tools-Third-Shelley-Powers/dp/05...). It may be a while before it's a truly valuable resource, but keep it in mind.

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

#40
post #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)…

apropos is a great command. Just learned about that one a few weeks ago.

Turns out it's a synonym for "man -k".

Post reply on HN