From owner-svn-doc-all@freebsd.org Thu Aug 16 13:55:10 2018 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E0E41066D61; Thu, 16 Aug 2018 13:55:10 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A96A38390D; Thu, 16 Aug 2018 13:55:09 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 703FD1A4F2; Thu, 16 Aug 2018 13:55:09 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7GDt9pM097981; Thu, 16 Aug 2018 13:55:09 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7GDt9Vr097980; Thu, 16 Aug 2018 13:55:09 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201808161355.w7GDt9Vr097980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Thu, 16 Aug 2018 13:55:09 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r52136 - head/en_US.ISO8859-1/articles/new-users X-SVN-Group: doc-head X-SVN-Commit-Author: bcr X-SVN-Commit-Paths: head/en_US.ISO8859-1/articles/new-users X-SVN-Commit-Revision: 52136 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 13:55:10 -0000 Author: bcr Date: Thu Aug 16 13:55:09 2018 New Revision: 52136 URL: https://svnweb.freebsd.org/changeset/doc/52136 Log: Wrap overlong lines, remove redundant markup and words, change to proper capitalization. Modified: head/en_US.ISO8859-1/articles/new-users/article.xml Modified: head/en_US.ISO8859-1/articles/new-users/article.xml ============================================================================== --- head/en_US.ISO8859-1/articles/new-users/article.xml Thu Aug 16 13:24:47 2018 (r52135) +++ head/en_US.ISO8859-1/articles/new-users/article.xml Thu Aug 16 13:55:09 2018 (r52136) @@ -3,14 +3,22 @@ "http://www.FreeBSD.org/XML/share/xml/freebsd50.dtd"> -
- For People New to Both FreeBSD and &unix; - +
+ + For People New to Both FreeBSD and &unix; - AnneliseAnderson + + + Annelise + Anderson + +
andrsn@andrsn.stanford.edu
-
+
+
1997-08-15 @@ -36,13 +44,16 @@ Logging in and Getting Out Log in (when you see login:) as a user you - created during installation or as root. - (Your FreeBSD installation will already have an account for - root; who can go anywhere and do anything, including deleting - essential files, so be careful!) The symbols &prompt.user; and - &prompt.root; in the following stand for the prompt (yours may - be different), with &prompt.user; indicating an ordinary user - and &prompt.root; indicating root. + created during installation or as root. (Your FreeBSD + installation will already have an account for root; who can go anywhere and do + anything, including deleting essential files, so be careful!) + The symbols &prompt.user; and &prompt.root; in the following + stand for the prompt (yours may be different), with + &prompt.user; indicating an ordinary user and &prompt.root; + indicating root. To log out (and get a new login: prompt) type @@ -83,62 +94,71 @@ - Adding A User with Root Privileges + Adding a User with Root Privileges - If you did not create any users when you installed the system - and are thus logged in as root, you should probably create a - user now with + If you did not create any users when you installed the + system and are thus logged in as root, you should probably create + a user now with &prompt.root; adduser - The first time you use adduser, it might ask for some - defaults to save. You might want to make the default shell - &man.csh.1; instead of &man.sh.1;, if it suggests + The first time you use adduser, it might + ask for some defaults to save. You might want to make the + default shell &man.csh.1; instead of &man.sh.1;, if it suggests sh as the default. Otherwise just press enter to accept each default. These defaults are saved in /etc/adduser.conf, an editable file. - Suppose you create a user jack with - full name Jack Benimble. Give jack a - password 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 + Suppose you create a user jack with full name + Jack Benimble. Give jack a password 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 &man.su.1; - command to become root. Then you will not get scolded any more for - logging in as root. + This will make it possible to log in as jack and use the &man.su.1; + command to become root. Then you will not get + scolded any more for logging in as root. You can quit adduser any time by typing CtrlC, - and at the end you will have a chance to approve your new user or - simply type n for no. You might want to create - a second new user so that when you edit jack's login - files, you will have a hot spare in case something goes - wrong. + and at the end you will have a chance to approve your new user + or simply type n for no. You might want to + create a second new user so that when you edit jack's login files, you will + have a hot spare in case something goes wrong. Once you have done this, use exit to get - back to a login prompt and log in as jack. - In general, it is a good idea to do as much work as possible as - an ordinary user who does not have the power—and - risk—of root. + back to a login prompt and log in as jack. In general, it is a good + idea to do as much work as possible as an ordinary user who does + not have the power—and risk—of root. If you already created a user and you want the user to be - able to su to root, you can log in as root - and edit the file /etc/group, adding jack - to the first line (the group wheel). But + able to su to root, you can log in as + root and edit the file + /etc/group, adding jack to the first line (the + group wheel). But first you need to practice &man.vi.1;, the text editor—or use the simpler text editor, &man.ee.1;, installed on recent versions of FreeBSD. - To delete a user, use the rmuser - command. + To delete a user, use rmuser. @@ -201,8 +221,9 @@ Lists hidden dot files with the others. - If you are root, the dot files show up - without the switch. + If you are root, + the dot files show up without the + switch. @@ -210,14 +231,12 @@ cd - Changes directories. cd - .. backs up one level; - note the space after cd. cd - /usr/local goes there. - cd ~ goes to the - home directory of the person logged in—e.g., - /usr/home/jack. Try cd - /cdrom, and then + Changes directories. cd .. backs + up one level; note the space after cd. + cd /usr/local goes there. cd + ~ goes to the home directory of the person + logged in—e.g., /usr/home/jack. + Try cd /cdrom, and then ls, to find out if your CDROM is mounted and working. @@ -289,11 +308,11 @@ text - The manual page for text. The - major source of documentation for &unix; systems. - man ls will tell - you all the ways to use the ls command. - Press Enter to move through text, + The manual page for text. + The major source of documentation for &unix; systems. + man ls will tell you all the ways to + use ls. Press Enter + to move through text, CtrlB to go back a page, CtrlF @@ -361,11 +380,12 @@ w. Are some of these not working very well? Both - &man.locate.1; and &man.whatis.1; depend - on a database that is rebuilt weekly. If your machine is not - going to be left on over the weekend (and running FreeBSD), you - might want to run the commands for daily, weekly, and monthly - maintenance now and then. Run them as root and, for now, give each one + &man.locate.1; and &man.whatis.1; depend on a database that is + rebuilt weekly. If your machine is not going to be left on over + the weekend (and running FreeBSD), you might want to run the + commands for daily, weekly, and monthly maintenance now and + then. Run them as root and, for now, give each one time to finish before you start the next one. @@ -391,16 +411,16 @@ Running such commands is part of system administration—and as a single user of a &unix; system, you are your own system administrator. Virtually everything you - need to be root to do is system administration. Such - responsibilities are not covered very well even in those big fat - books on &unix;, which seem to devote a lot of space to pulling - down menus in windows managers. You might want to get one of - the two leading books on systems administration, either Evi - Nemeth et.al.'s UNIX System Administration - Handbook (Prentice-Hall, 1995, ISBN - 0-13-15051-7)—the second edition with the red cover; or - Æleen Frisch's Essential System - Administration (O'Reilly & Associates, 2002, + need to be root to do + is system administration. Such responsibilities are not covered + very well even in those big fat books on &unix;, which seem to + devote a lot of space to pulling down menus in windows managers. + You might want to get one of the two leading books on systems + administration, either Evi Nemeth et.al.'s UNIX + System Administration Handbook (Prentice-Hall, + 1995, ISBN 0-13-15051-7)—the second edition with the red + cover; or Æleen Frisch's Essential System + Administration (O'Reilly & Associates, 2002, ISBN 0-596-00343-9). I used Nemeth. @@ -409,10 +429,11 @@ To configure your system, you need to edit text files. Most of them will be in the /etc directory; and - you will need to su to root to be able to - change them. You can use the easy ee, but in - the long run the text editor vi is worth - learning. There is an excellent tutorial on vi in + you will need to su to root to be able to change them. + You can use the easy ee, but in the long run + the text editor vi is worth learning. There + is an excellent tutorial on vi in /usr/src/contrib/nvi/docs/tutorial, if you have the system sources installed. @@ -436,8 +457,8 @@ &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 + because mv preserves the original date + and owner of the file. You can now edit rc.conf. If you want the original back, you would then mv rc.conf rc.conf.myedit (assuming you want to preserve your edited version) and @@ -562,37 +583,49 @@ - Ctrlb and - Ctrlf + + + Ctrl + b + + and + + Ctrl + f + + go back and forward a screen, as they do with - more and view. + more and + view. Practice with vi in your home directory by creating a new file with vi - filename and adding and + filename and adding and deleting text, saving the file, and calling it up again. vi delivers some surprises because it is - really quite complex, and sometimes you will inadvertently issue a - command that will do something you do not expect. (Some people - actually like vi—it is more powerful - than DOS EDIT—find out about the :r - command.) Use Esc one or more times to be sure - you are in command mode and proceed from there when it gives you - trouble, save often with :w, and use - :q! to get out and start over (from your last - :w) when you need to. + really quite complex, and sometimes you will inadvertently issue + a command that will do something you do not expect. (Some + people actually like vi—it is more + powerful than DOS EDIT—find out about + :r.) Use Esc one or more + times to be sure you are in command mode and proceed from there + when it gives you trouble, save often with + :w, and use :q! to get out + and start over (from your last :w) when you + need to. Now you can cd to - /etc, su to root, use - vi to edit the file - /etc/group, and add a user to wheel so the - user has root privileges. Just add a comma and the user's login - name to the end of the first line in the file, press + /etc, su to root, use vi + to edit the file /etc/group, and add a user + to wheel so the user + has root privileges. Just add a comma and the user's login name + to the end of the first line in the file, press Esc, and use :wq to write the file to disk and quit. Instantly effective. (You did not put a space after the comma, did you?) @@ -614,13 +647,17 @@ ps aux - shows processes running. ps ax is a - narrower form. + shows processes running. ps ax is + a narrower form. - rm filename + + rm + filename + + remove filename. @@ -628,11 +665,15 @@ - rm -R dir + + rm -R + dir + + - removes a directory dir and all - subdirectories—careful! + removes a directory dir and + all subdirectories—careful! @@ -653,7 +694,8 @@ passwd - to change user's password (or root's password) + to change user's password (or root's password) @@ -666,9 +708,9 @@ - Use find to locate filename in - /usr or any of its subdirectories - with + Use find to locate + filename in /usr or + any of its subdirectories with &prompt.user; find /usr -name "filename" @@ -682,10 +724,10 @@ file(s) on all mounted filesystems, including the CDROM and the DOS partition. - An excellent book that explains &unix; commands and utilities - is Abrahams & Larson, Unix for the - Impatient (2nd ed., Addison-Wesley, 1996). - There is also a lot of &unix; information on the Internet. + An excellent book that explains &unix; commands and + utilities is Abrahams & Larson, Unix for the + Impatient (2nd ed., Addison-Wesley, 1996). There + is also a lot of &unix; information on the Internet. @@ -694,15 +736,15 @@ You should now have the tools you need to get around and edit files, so you can get everything up and running. There is a great deal of information in the FreeBSD handbook (which is - probably on your hard drive) and FreeBSD's web site. A - wide variety of packages and ports are on the CDROM as well as + probably on your hard drive) and FreeBSD's web site. + A wide variety of packages and ports are on the CDROM as well as the web site. The handbook tells you more about how to use them (get the package if it exists, with pkg add packagename, where - packagename is the filename of - the package). The CDROM has lists of the packages and ports - with brief descriptions in - cdrom/packages/index, + packagename is the filename of the + package). The CDROM has lists of the packages and ports with + brief descriptions in cdrom/packages/index, cdrom/packages/index.txt, and cdrom/ports/index, with fuller descriptions in /cdrom/ports/*/*/pkg/DESCR, where the @@ -783,7 +825,7 @@ tcsh does everything csh does and more. It allows you to recall commands with the arrow keys and edit them. It has tab-key completion of filenames - (csh uses the Esc key), and + (csh uses Esc), and it lets you switch to the directory you were last in with cd -. It is also much easier to alter your prompt with tcsh. It makes life a lot @@ -798,34 +840,39 @@ - Use the chsh command to change your - shell to tcsh permanently, or type + Use chsh to change your shell to + tcsh permanently, or type tcsh at the prompt to change your shell without logging in again. - It can be dangerous to change root's shell to something + 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 + 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 + -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 as an alias + with: + + alias su su -m When tcsh starts up, it will read the /etc/csh.cshrc and /etc/csh.login files, as does - csh. It will also read the - .login file in your home directory and the - .cshrc file as well, unless you provide a - .tcshrc file. This you can do by simply - copying .cshrc to + csh. It will also read + .login in your home directory and + .cshrc as well, unless you provide a + .tcshrc. This you can do by simply copying + .cshrc to .tcshrc. Now that you have installed tcsh, you can @@ -833,34 +880,35 @@ for tcsh, but here is a line to put in your .tcshrc that will tell you how many commands you have typed, what time it is, and what directory you - are in. It also produces a > if you are an - ordinary user and a # if you are root, but - tsch will do that in any case: + are in. It also produces a > if you are + an ordinary user and a # if you are + root, but tsch will do + that in any case: set prompt = "%h %t %~ %# " This should go in the same place as the existing set prompt line if there is one, or under "if($?prompt) then" if not. Comment out the old line; you can always switch back to it if - you prefer it. Do not forget the spaces and quotes. You can get - the .tcshrc reread by typing + you prefer it. Do not forget the spaces and quotes. You can + get the .tcshrc reread by typing source .tcshrc. You can get a listing of other environmental variables that have been set by typing env at the prompt. The result will show you your default editor, pager, and terminal type, among possibly many others. A useful command if - you log in from a remote location and can not run a program + you log in from a remote location and cannot run a program because the terminal is not capable is setenv TERM - vt100. + vt100. Other - As root, you can unmount the CDROM with - /sbin/umount /cdrom, take it out of the - drive, insert another one, and mount it with + As root, you can + unmount the CDROM with /sbin/umount /cdrom, + take it out of the drive, insert another one, and mount it with /sbin/mount_cd9660 /dev/cd0a /cdrom assuming cd0a is the device name for your CDROM drive. The most recent versions of FreeBSD let you mount the @@ -872,22 +920,22 @@ might try playing games from the CDROM. This involves using lndir, which gets installed with the X Window System, to tell the program(s) where to find the necessary - files, because they are in the /cdrom file - system instead of in /usr and its - subdirectories, which is where they are expected to be. Read - man lndir. + files, because they are in /cdrom instead + of in /usr and its subdirectories, which is + where they are expected to be. Read man + lndir. Comments Welcome - If you use this guide I would be interested in knowing where it - was unclear and what was left out that you think should be + If you use this guide I would be interested in knowing where + it was unclear and what was left out that you think should be included, and if it was helpful. My thanks to Eugene W. Stark, professor of computer science at SUNY-Stony Brook, and John Fieber for helpful comments. Annelise Anderson, - andrsn@andrsn.stanford.edu + andrsn@andrsn.stanford.edu