1

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 :-).

Trollhorn
  • 203
  • 3
  • 10
  • 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? – Rob Moir 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 02 '10 at 02:38

6 Answers6

6

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

Khaled
  • 36,533
  • 8
  • 72
  • 99
6

Pipes and redirections are a must !

Guillaume
  • 1,063
  • 5
  • 12
  • 24
  • 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
4

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.

dunxd
  • 9,632
  • 22
  • 81
  • 118
2

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.

quinnr
  • 429
  • 1
  • 4
  • 9
1

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.

0

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

SpacemanSpiff
  • 8,753
  • 1
  • 24
  • 35