Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm supposed to give an introduction to using the shell (i.e. bash) to total beginners. Which is the most basic/useful stuff I can teach someone within 1 1/2 hours without demanding too much?

Here are some point I thought up:

  • Where Am I (pwd)
  • Change Directories (cd, cd .., cd -)
  • Create Directories (mkdir, mkdir -p)
  • Rename Files/Directories (mv)
  • copy Files/Directories (cp, cp -r)
  • listing directory entries (ls, ls -l, ls -a)

EDIT

By total beginners I mean total beginners to Unix/Linux in general :-).

share|improve this question
    
When you say 'total beginners', do you just mean beginners to bash? So, they will be familiar with a command-line and important, general OS/file system fundamentals in general? –  Andrew Barber Nov 30 '10 at 12:44
3  
Begin with showing them how to solve the problems they are trying to solve through their use of a computer. No really. If you were learning to cook, would you like to hear a dry list of various ingredients or cooking techniques, or would you rather be asked what some of your favourite dishes were and then get shown how to make them? –  RobM Nov 30 '10 at 12:54
1  
What are they going to be doing with the knowledge? Are these new helpdesk employees who need to know how to reset passwords, or will they be doing specific support for a single application, or is this a Linux User Group re-education camp for formerly-Windows-using moms and grandmothers? –  mfinni Nov 30 '10 at 14:14
    
@Robert Moir: Actually, I think the best way to learn is from the ground up, but by keeping things interesting, practical and accessible. I find most cooking shows incredibly boring, but Good Eats with Alton Brown is an awesome show for doing precisely the things you say don't work. –  jgoldschrafe Nov 30 '10 at 16:37
    
I'm much more a fan of Come Dine With Me, but a technical analogy for that escapes me. –  Tom O'Connor Dec 2 '10 at 2:38

6 Answers 6

up vote 7 down vote accepted

This depends on what the person may need to do. Anyway, you can add:

1- Files permissions.

2- More commands like: less, grep, echo, cat, vi, head, and tail.

3- Seeking help using man command.

4- Basic shell scripting if the time allows :)

share|improve this answer
    
+1 ... and man man is surprisingly informative :) –  danlefree Nov 30 '10 at 15:51

Pipes and redirections are a must !

share|improve this answer
1  
For beginners? Only if they're going to be power users. If they just need to, for example, find and get files, that would be a little more than necessary. –  mfinni Nov 30 '10 at 13:42

Make sure to cover google searches to find the commands they need to achieve specific tasks, and then man so they have a hope of figuring out how to use the commands.

share|improve this answer

The biggest thing is showing them how to get help. They should know about man and the "--help" switch. On the web, ss64.com is a good reference for people transitioning between operating systems. You can look up different commands and see what the equivalents are.

No one has mentioned "rm" and "rm -r". They gotta know how to delete stuff. I'm assuming they won't have root access, or sudo privileges, on the machine.

I would recommend showing them how to set aliases. Aliases are nice in general, and they might be more comfortable setting up some commands which are equivalent to cmd.exe commands.

Show them Ctrl+c and Ctrl+d. They will probably know about Ctrl+c, but they might now be aware that some programs, like bc, use Ctrl+d to exit.

share|improve this answer

This book helped me ALOT... and teaches you some basic scripting... it's mac focused, but BASH is BASH.

http://www.amazon.com/Mac-Unix-101-Byte-Sized-Projects/dp/0321374118/ref=sr_1_1?ie=UTF8&s=books&qid=1291127236&sr=8-1

share|improve this answer

Since you asked this on here as well as askubuntu.com, I'll answer on both places as well. :-)

Make sure that you talk not only about how to use the command line, but why they should care. If you're thinking in a GUI mindset, cd and pwd are a poor way to traverse directories looking for files. Your students need to understand that the CLI is not a clumsy way of doing the tasks they're used to doing, but a clean, crisp, and powerful way to do lots of cool stuff.

I would suggest a short demonstration illustrating what makes it so cool. Maybe an illustration of piping, or a cool use of find or grep.

Also, if you can assign them a book to read, give them In the Beginning...was the Command Line. It is the best exposition I've seen on the philosophy behind CLI in general.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.