Unix Beginners Guide

The beginners guide mentioned here was originally written to help university students getting started with Solaris. It has long since been rendered obsolete some years ago and has been removed to ensure that people are using up-to-date material.
> grep `whoami` /etc/passwd

The path after the last colon is your login shell.

... unless you're using NIS, in which case /etc/passwd is a stubby little thing that may not even have your username in it. Try "finger `whoami`" (if finger is installed, I think it is in most places), or "chsh" (again, may or may not work in a NIS environment). Failing that, ask your local sysadmin. (You could write a Perl one-liner to call getpwent(), but I doubt that qualifies as "simple"...)

How can I resist. :-) perl -le 'print((getpwuid($<))[8])' -- JohnDouglasPorter

If you include any of these suggestions, I'd actually skip the use of `whoami` and tell them to type their username in at that point. People often miss the use of backquotes and type 'whoami' instead.

Perhaps it's easiest to see your current shell - it's unlikely to have changed since you logged in:
  ps -p $$
The output will vary according to your flavor of Unix, but the last thing should always be the name of your shell.

OK, here are some remarks. There are more {SunOS,csh,CDE}-specific things than I've mentioned, by the way. -- GarethMcCaughan

I agree that introducing the ViEditor to beginners amounts to sadism... I wasn't the sadist concerned, honest. I suppose I'll have to say something about emacs to even things up ;-)

This is a great start and could be helpful to a lot of others. I would not use csh for the examples as bash is much more popular, especially around Linux. I also agree that introducing vi to beginners amounts to sadism. I would use the EmacsEditor myself. I agree with the comments made before that there are many Sun specific things as well. -- sg

(You'd use emacs yourself... but would you recommend it for beginners? That's the question. I for one think vi is probably the less scary of the two. -- JohnDouglasPorter)

vi is generally all you can count on being installed (especially on vanilla System V set ups), and so has to be in any UNIX tutorial I think. If others are allowed, I suggest the NanoEditor since it is not modal and is pretty simple to just edit some config files with. -- DominicFitzpatrick?

There is one thing newbies definitely need to know about vi: how to get out in case they accidentally get stuck in it (which can often happen on systems with 'edit' or 'e' aliased to vi). Teach them how to :q and :qw, and the rest, as they say, is commentary... -- RickSamuels

There was a very comprehensive Unix/Linux Beginner's Tutorial at http://mandrakeuser.org/. It covers just about everything. Have you looked at that for ideas? -- sg


View edit of January 18, 2010 or FindPage with title or text search