From owner-freebsd-doc Sat Oct 9 9:40:31 1999 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 71D3F154D1 for ; Sat, 9 Oct 1999 09:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id JAA43632; Sat, 9 Oct 1999 09:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from terrapin.ru.ac.za (terrapin.ru.ac.za [146.231.128.6]) by hub.freebsd.org (Postfix) with ESMTP id D4D13151D3 for ; Sat, 9 Oct 1999 09:30:44 -0700 (PDT) (envelope-from nbm@mithrandr.moria.org) Received: from duca.dialup.ru.ac.za ([146.231.98.24] helo=mithrandr.moria.org) by terrapin.ru.ac.za with esmtp (Exim 3.03 #1) id 11ZzOI-0002Mb-00 for FreeBSD-gnats-submit@freebsd.org; Sat, 09 Oct 1999 18:30:39 +0200 Received: (qmail 75614 invoked by uid 1001); 9 Oct 1999 13:05:01 -0000 Message-Id: <19991009130501.75613.qmail@mithrandr.moria.org> Date: 9 Oct 1999 13:05:01 -0000 From: nbm@rucus.ru.ac.za Reply-To: nbm@rucus.ru.ac.za To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: docs/14236: markup fixes for new-users article Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14236 >Category: docs >Synopsis: markup fixes for new-users article >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 9 09:40:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Neil Blakey-Milner >Release: FreeBSD 4.0-CURRENT i386 >Organization: Rhodes University Computer Users' Society >Environment: FreeBSD mithrandr.moria.org 4.0-CURRENT FreeBSD 4.0-CURRENT #2: Wed Sep 29 17:30:21 SAST 1999 root@mithrandr.moria.org:/usr/src/sys/compile/MITHRANDR i386 >Description: # and % to &prompt entities. Un--wrap examples. Insert and s for a section. >How-To-Repeat: >Fix: cvs diff: Diffing . Index: article.sgml =================================================================== RCS file: /home/nbm/ncvs/doc/en_US.ISO_8859-1/articles/new-users/article.sgml,v retrieving revision 1.8 diff -u -r1.8 article.sgml --- article.sgml 1999/10/04 21:36:22 1.8 +++ article.sgml 1999/10/09 11:21:45 @@ -42,27 +42,33 @@ # indicating root. To log out (and get a new login: prompt) type + -# exit +&prompt.root; exit + as often as necessary. Yes, press enter after commands, and remember that Unix is case-sensitive—exit, not EXIT. To shut down the machine type: + -# /sbin/shutdown -h now +&prompt.root; /sbin/shutdown -h now + Or to reboot type + -# /sbin/shutdown -r now +&prompt.root; /sbin/shutdown -r now + or + -# /sbin/reboot +&prompt.root; /sbin/reboot - You can also reboot with CtrlAltDelete. @@ -78,9 +84,11 @@ If you didn't create any users when you installed the system and are thus logged in as root, you should probably create a user now with + # adduser + The first time you use adduser, it might ask for some defaults to save. You might want to make the default shell csh instead of sh, if it suggests sh as the default. Otherwise just press enter to accept each default. @@ -92,9 +100,11 @@ if security (even kids around who might pound on the keyboard) is an issue. When it asks you if you want to invite jack into other groups, type wheel + Login group is ``jack''. Invite jack into other groups: wheel + This will make it possible to log in as jack and use the su command to become root. Then you won't get scolded any more for logging in as root. @@ -132,6 +142,7 @@ FreeBSD. Here are some commands and what they do: + id @@ -231,7 +242,7 @@ - + You'll notice aliases in .cshrc for some of the ls commands (they're very convenient). You can create other aliases by editing .cshrc. @@ -328,14 +339,15 @@ want to run the commands for daily, weekly, and monthly maintenance now and then. Run them as root and give each one time to finish before you start the next one, for now. + -# /etc/daily +&prompt.root; /etc/daily output omitted -# /etc/weekly +&prompt.root; /etc/weekly output omitted -# /etc/monthly +&prompt.root; /etc/monthly output omitted - + If you get tired waiting, press AltF2 to get @@ -374,7 +386,7 @@ excellent tutorial on vi in /usr/src/contrib/nvi/docs/tutorial if you have that installed; otherwise you can get it by ftp to -ftp.cdrom.com in the directory +ftp.cdrom.com in the directory FreeBSD/FreeBSD-current/src/contrib/nvi/docs/tutorial. Before you edit a @@ -382,37 +394,44 @@ /etc/rc.conf. You could just use cd /etc to get to the /etc directory and do: + -# cp rc.conf rc.conf.orig +&prompt.root; cp rc.conf rc.conf.orig - + This would copy rc.conf to rc.conf.orig, and you could later copy rc.conf.orig to rc.conf to recover the original. But even better would be moving (renaming) and then copying back: + -# mv rc.conf rc.conf.orig -# cp rc.conf.orig rc.conf +&prompt.root; mv rc.conf rc.conf.orig +&prompt.root; cp rc.conf.orig rc.conf - + because the mv command preserves the original date and owner of the file. You can now edit rc.conf. If you want the original back, you'd then mv rc.conf rc.conf.myedit (assuming you want to preserve your edited version) and then + # mv rc.conf.orig rc.conf + to put things back the way they were. To edit a file, type + -# vi filename +&prompt.root; vi filename + Move through the text with the arrow keys. Esc (the escape key) puts vi in command mode. Here are some commands: + x @@ -445,8 +464,10 @@ + Once you type i or a, you can enter text. Esc puts you back in command mode where you can type + :w @@ -516,7 +537,6 @@ - Practice with vi in your home directory by creating a new file with vi filename and adding @@ -549,35 +569,43 @@ print it from DOS. Suppose you want to read carefully about changing permissions on files (pretty important). You can use the command man chmod to read about it. The command + -# man chmod | col -b > chmod.txt +&prompt.user; man chmod | col -b > chmod.txt + will remove formatting codes and send the man page to the chmod.txt file instead of showing it on your screen. Now put a dos-formatted diskette in your floppy drive a, su to root, and type + -# /sbin/mount -t msdos /dev/fd0 /mnt +&prompt.root; /sbin/mount -t msdos /dev/fd0 /mnt + to mount the floppy drive on /mnt. Now (you no longer need to be root, and you can type exit to get back to being user jack) you can go to the directory where you created chmod.txt and copy the file to the floppy with: + -% cp chmod.txt /mnt +&prompt.user; cp chmod.txt /mnt + and use ls /mnt to get a directory listing of /mnt, which should show the file chmod.txt. You might especially want to make a file from /sbin/dmesg by typing + -% /sbin/dmesg > dmesg.txt +&prompt.user; /sbin/dmesg > dmesg.txt + and copying dmesg.txt to the floppy. /sbin/dmesg is the boot log record, and it's useful to understand it because it shows what FreeBSD found when it @@ -589,9 +617,11 @@ You can now dismount the floppy drive (as root) to get the disk out with + -# /sbin/umount /mnt +&prompt.root; /sbin/umount /mnt + and reboot to go to DOS. Copy these files to a DOS directory, call them up with DOS EDIT, Windows Notepad or Wordpad, or a word processor, make a minor change so the file has to be saved, and print as you normally @@ -622,7 +652,6 @@ Other Useful Commands - df @@ -685,13 +714,15 @@ - + Use find to locate filename in /usr or any of its subdirectories with + -% find /usr -name "filename" +&prompt.user; find /usr -name "filename" + You can use * as a wildcard in "filename" (which should be in quotes). If you tell find to search in / @@ -736,11 +767,11 @@ Find the port you want, say kermit. There will be a directory for it on the cdrom. Copy the subdirectory to /usr/local (a good place for software you add -that should be available to all users) with: +that should be available to all users) with: -# cp -R /cdrom/ports/comm/kermit /usr/local +&prompt.root; cp -R /cdrom/ports/comm/kermit /usr/local - + This should result in a /usr/local/kermit subdirectory that has all the files that the kermit subdirectory on the CDROM has. @@ -757,10 +788,10 @@ Then cd to the subdirectory of /usr/local/kermit that has the file Makefile. Type + -# make all install +&prompt.root; make all install - During this process the port will ftp to get any compressed files it needs that it didn't find on the cdrom or in @@ -808,10 +839,12 @@ .cshrc in each user's home directory or (easier) in /etc/csh.cshrc, the system-wide csh start-up file: + setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB setenv XNLSPATH /usr/X11R6/lib/X11/nls + This assumes that the file XKeysymDB and the directory nls are in /usr/X11R6/lib/X11; if they're not, find them and put them there. @@ -849,26 +882,30 @@ Here are the three steps for installing a new shell: - 1. Install the shell as a port or a package, just as you + +Install the shell as a port or a package, just as you would any other port or package. Use rehash and which tcsh (assuming you're installing tcsh) to -make sure it got installed. +make sure it got installed. - 2. As root, edit /etc/shells, adding +As root, edit /etc/shells, adding a line in the file for the new shell, in this case /usr/local/bin/tcsh, -and save the file. (Some ports may do this for you.) +and save the file. (Some ports may do this for you.) - 3. Use the chsh command to change your shell to +Use the chsh command to change your shell to tcsh permanently, or type tcsh at the prompt to -change your shell without logging in again. +change your shell without logging in again. + -Note: It can be dangerous to change root's shell + +It can be dangerous to change root's shell to something other than sh or csh on early versions of FreeBSD and many other versions of Unix; you may not have a working shell when the system puts you into single user mode. The solution is to use su -m to become root, which will give you the tcsh as root, because the shell is part of the environment. You can make this permanent by adding it to your .tcshrc file as an alias with alias su su -m. + When tcsh starts up, it will read the /etc/csh.cshrc and /etc/csh.login >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message