

Ask HN: UNIX / Command Line tutorial for non-dummies - crux

Dear HN:<p>I've recently begun the process of hosting a website for a friend on mine. He'll just be running a wordpress install, but I'm giving him shell access and it would be nice if he was able to do basic php and css config himself if he needs to. That said, he has basically no UNIX experience. He's not a computing novice - he's currently working through a python programming course, for instance - but he's never used GNU/Linux, and whatever OS X experience he has is pretty superficial.<p>Do you all have any favorite tutorials to get him up to speed with sshing into GNU/Linux shell account running bash?
======
motoko
Please set up automatic system imaging for your server (e.g. Slicehost
backups). The biggest barrier to learning is fear, so it helps him to know
that he can press the "undo button" for the entire system at any time.

Other than that, I recommend letting him watch you use the terminal for 20
minutes to show him what proficient console use looks like. Advanced commands
can be Googled later, and those "Unix Cheat Sheets" and cram tutorials were
always simultaneously too complex and too simplistic for me to ever find
useful. A working understanding would be more valuable.

------
nailer
Make your own. Most Unix tutorials are particularly poor: as Unix attracts
people who like technology (good thing), documentation is technology focused
rather than task focused (bad thing).

* Logging in

* Making a test file. Making folders, copying, moving, removing files and folders.

* Show how the filesystem standard sorts files by type (binary, system binary, library, config files and service scripts) and by importance (required to recover the system in an emergency).

* Disk management - learning how volumes are attached to different folders (the filesystem table), and how volumes are named

* Installing software packages

* Starting, stopping, restarting, and checking the status of services

* Managing processes, using kill/killall and kill -KILL/killall -KILL

~~~
notauser
For normal people, diagrams help.

A tree diagram of the file system, labeled with what goes where and why, seems
to fix about 99.99% of problems new users have getting to grips with Linux.

/bin/what ???

------
silentbicycle
Note: This is more of a long-term-understanding answer than a quick-tutorial
answer.

If he wants to understand Unix, _The Unix Programming Environment_ by
Kernighan and Pike is good (as parenthesis also noted). Also, say what you
will about ESR, his _The Art of Unix Programming_
(<http://www.faqs.org/docs/artu/>) explains the rationale behind most of the
design ideas common in Unix, as well as various historical accidents that have
influenced it. (It more about Unix's design/culture than programming, IMHO.)
Plus, free online.

In particular, Unix will probably seem really awkward and limited until he
really deeply gets the idea of doing things by composing relatively simple
programs. There are a few other idioms fundamental to Unix, but that's
probably the big one. (That would probably be easier if he had experience with
Haskell, incidentally; Unix pipe IO can be very similar to monads.)

A general (perhaps very general) understanding of C will also go a _long_ way,
particularly with understanding the mindset behind the man pages.

------
bprater
Does he actually want to know more about the command line? If he's not, I
wouldn't waste your effort. Some people aren't learners, they just want to
accomplish a task.

If he is, definitely hook him up with a tutorial. I like the idea of letting
him peek over your shoulder as you work.

Ultimately, there are very few commands you need to know to get started. This
might work:

    
    
      - Move around the file system, echo the current path
      - List the files (in the various ways you can do this)
      - Create and edit a file (nano?)
      - Move and delete the file
      - Very brief overview of permissions
      - A primer on user directories and how to get back there easily
    

I think that would get the average Joe enough tools to get going.

------
brianm
Get a copy of [http://www.amazon.com/Power-Tools-Third-Shelley-
Powers/dp/05...](http://www.amazon.com/Power-Tools-Third-Shelley-
Powers/dp/0596003307/) and experiment with interesting topics in it.

------
parenthesis
The first few chapters of _The Unix Programming Environment_ by Kernighan and
Pike give an excellent introduction to basic Unix concepts and usage.

------
tebeka
For bash have a look at <http://tldp.org/LDP/abs/html/>

------
Kaizyn
Can anyone without shell/cli knowledge really be called an experienced user?

~~~
crux
He's definitely not an experienced user, at least not with Linux or the
command-line. He just has a lot of experience with computers. My point was
that this isn't a grandma situation: 'Ok, so this is called a FILE. Your
website is made up of lots of different files. Files are kept in directories,
which are like folders, and end with /…'

PS: This actually makes me think interesting thoughts about the meaning of the
word 'user', the many different senses in which we use it, and the many
overlapping ways one could be said to be an experienced user, such that many
experienced users all have entirely distinct skill sets with no overlap.

~~~
Kaizyn
Even on Windows, I find it hard to think of a power user who isn't at least
passingly familiar with the command prompt.

I'd recommend either O'Reilly's bash shell book or 'classic shell scripting'
which covers a bit more than just a shell like bash.

