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.
- I assumed that users would have csh as their default shell. Is there a relatively simple way of working out which shell users have?
> 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.
- The tool you used to generate the HTML (LaTeX2HTML?) likes to split things up so that each teeny-tiny bit of text is a separate page. This drives me nuts, and I'm sure I'm not alone. Larger chunks, please!
- [Logging in] Gratuitously SunOS-specific; replace "the prompt" with "a prompt like".
- [Changing your password] Gratuitously site-specific: "The UNIX lab contains ...". And does anyone really still use CDE? (Yes, it's standard fare in Solaris at least.)
- [The UNIX Manual] It would probably make newbies feel less stupid if you warn them that manpages are often cryptic, ill-written or dependent on knowledge readers may not possess. If you intend the thing to work for a broader audience than SunOS users, you should perhaps mention that some versions of man want you to say man -s 2 kill instead of man 2 kill. Depending on what sort of newbies this is for, it might also be worth adding some explanation of the volume titles. (Will they understand "Library functions", for instance?) It may not be helpful, but it is illuminating to make new users look at ManMan output.
- [X Windows] Pedantic note: the official name for the thing is "the X Window system"; the system's name is "X", not "X Windows". Does this matter? Probably not. I'm sure far more people call it "X Windows" than call it "X". (I'm not... though admittedly most of the people I know who call it "X" think they're abbreviating "X Windows".) It might be helpful to acknowledge the fact that having the "server" on your local machine and the "clients" on a compute server somewhere else, as often happens, is counterintuitive. The final sentence would, I think, be better if it said "On most UNIX machines which don't offer a graphical login screen, you can start X by typing the startx command".
- [Remote X Usage] This is csh-specific on account of its use of setenv. I'm a bit scared about security when I read the recommendation for xhost and telnet, too...
- [The Command-line] Also assumes that readers will be using csh. It's also a bit misleading, I think, to say that csh "provides an environment that resembles the C programming language". It does resemble C more than, say, bash does, but that's about as far as it goes!
- [File Management] "Directories are be contained within directories" -- I think the "are" should say "can". It might be worth explaining that a directory is the same thing as some systems call a folder.
- [Directory Navigation] You explain the ~username abbreviation, but not the (much more widely used, I think) bare ~ abbreviation. I think they should both be mentioned. I think I'd leave discussion of permissions for later.
- [Other important commands] alias is csh-specific, of course. I'd leave chown and cat out at this stage.
- [Other useful commands] wc is of pretty doubtful utility, really. I use it about once a month. I'd leave it out at this stage. If you're covering head, why not tail too? There's a typo in the description of head: the expanded form of head *.c has the word head missing! The description of file, as it stands, is pretty unhelpful. Likewise grep, since there's no explanation of regular expressions. script is covered in this page and also in its predecessor.
- [Default file permissions] This will make no sense to most newcomers, because they won't have encountered the octal permissions thing before at all. I'd recommend against aliasing rm to rm -i; the only result will be that after a while they'll just hit "y" automatically...
- [Programming with the Shell] You've used "~" without escaping it a few times in the main text, and LaTeX2HTML has quite correctly turned it into .(It's OK in verbatim text.)
- [Editing text with vi] I think it's an act of sadism to make vi the first editor a Unix newbie encounters. :-) Representing the caret character as a GIF is gruesome and unnecessary: use the one in the \tt font.
- [File operations] It might be worth mentioning something that bites me every now and then: doing :w foo doesn't change the current file name to foo, so the idiom of "open file, save with new name, edit, save, edit, save, etc" that works in (e.g.) emacs and M$Word doesn't work in vi. (At least, it doesn't in vim, which is the variety of vi I prefer.)
- [Process control] I think ps stands for process status, not processor status. If you regard nice as of little use today (as I do too, though I use it sometimes at work) then don't mention it here. "has it's own job control features" - should be "its", not "it's". There's a missing ")" right at the end of the page.
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
CategoryUnix