Annotation of wikisrc/guide/boot.mdwn, revision 1.1

1.1     ! jdf         1: # The first steps on NetBSD
        !             2: 
        !             3: After installing and rebooting, the computer will boot from the hard disk. If
        !             4: everything went well, you'll be looking at the login prompt within a few seconds
        !             5: (or minutes, depending on your hardware). The system is not yet fully
        !             6: configured, but basic configuration is easy. You will see how to quickly
        !             7: configure some important things, and in doing so you will learn some basics
        !             8: about how the system works.
        !             9: 
        !            10: ## Troubleshooting
        !            11: 
        !            12: ### Boot problems
        !            13: 
        !            14: If the system does not boot it could be that the boot manager was not installed
        !            15: correctly or that there is a problem with the *MBR* (*Master Boot Record*). Boot
        !            16: the machine from your install medium (CD, DVD, floppy, etc.) and when you see
        !            17: the boot menu, select the option to drop to the boot prompt.
        !            18: 
        !            19:     type "?" or "help" for help.
        !            20:     > ?
        !            21:     commands are:
        !            22:     boot [xdNx:][filename] [-12acdqsvxz]
        !            23:          (ex. "hd0a:netbsd.old -s")
        !            24:     ls [path]
        !            25:     dev xd[N[x]]:
        !            26:     consdev {pc|com[0123]|com[0123]kbd|auto}
        !            27:     modules {enabled|disabled}
        !            28:     load {path_to_module}
        !            29:     multiboot [xdNx:][filename] [<args>]
        !            30:     help|?
        !            31:     quit
        !            32:     > boot hd0a:netbsd
        !            33: 
        !            34: The system should now boot from the hard disk. If NetBSD does not boot correctly
        !            35: from the hard disk, there is probably a Master Boot Record problem. You can
        !            36: install the boot manager or modify its configuration with the **fdisk -B**
        !            37: command. See [[Installing the boot manager|guide/misc#bootmanager]] for a
        !            38: detailed description.
        !            39: 
        !            40: ### Misconfiguration of `/etc/rc.conf`
        !            41: 
        !            42: If you or the installation software haven't done any configuration of
        !            43: `/etc/rc.conf` (sysinst normally will), the system will drop you into *single
        !            44: user mode* and show the message
        !            45: 
        !            46:     /etc/rc.conf is not configured. Multiuser boot aborted
        !            47: 
        !            48: When the system asks you to choose a shell, simply press `RETURN` to get to a
        !            49: /bin/sh prompt. If you are asked for a terminal type, respond with `vt220`
        !            50: (or whatever is appropriate for your terminal type) and press RETURN. You may
        !            51: need to type one of the following commands to get your delete key to work
        !            52: properly, depending on your keyboard:
        !            53: 
        !            54:     # stty erase '^h'
        !            55:     # stty erase '^?'
        !            56: 
        !            57: At this point, you need to configure at least one file in the `/etc` directory.
        !            58: However, the root file system (`/`) is mounted read-only, so you will first need
        !            59: to make it writable with:
        !            60: 
        !            61:     # mount -u -w /
        !            62: 
        !            63: Next, take a look at the `/etc/rc.conf` file. Modify it to your tastes, making
        !            64: sure that you set `rc_configured=YES` so that you don't end up in this position
        !            65: again. Default values for the various programs can be found in
        !            66: `/etc/defaults/rc.conf`. More complete documentation can be found in
        !            67: [rc.conf(5)](http://netbsd.gw.com/cgi-bin/man-cgi?rc.conf+5+NetBSD-5.0.1+i386).
        !            68: 
        !            69: When you have finished, type `exit` at the prompt to leave the single-user shell
        !            70: and continue with the multi-user boot.
        !            71: 
        !            72: ## The man command
        !            73: 
        !            74: If you have never used a Unix(-like) operating system before, your best friend
        !            75: is now the
        !            76: [man(1)](http://netbsd.gw.com/cgi-bin/man-cgi?man+1+NetBSD-current) command,
        !            77: which displays a manual page. The NetBSD manual pages are among the best and
        !            78: most detailed you can find, although they are very technical.
        !            79: 
        !            80: A good manual to read after booting a new NetBSD system is
        !            81: [afterboot(8)](http://netbsd.gw.com/cgi-bin/man-cgi?afterboot+8+NetBSD-5.0.1+i386).
        !            82: It contains information about various necessary and useful configuration
        !            83: settings.
        !            84: 
        !            85: `man name` shows the man page of the `name` command and `man -k name` shows a
        !            86: list of man pages dealing with `name`. The tool
        !            87: [apropos(1)](http://netbsd.gw.com/cgi-bin/man-cgi?apropos+1+NetBSD-current) does
        !            88: a full-text search on the manpages installed on your system, sorted by
        !            89: relevance.
        !            90: 
        !            91: To learn the basics of the `man` command, type:
        !            92: 
        !            93:     # man man
        !            94: 
        !            95: Manual pages contain not only information about commands but also descriptions
        !            96: of some NetBSD features and structures. For example, take a look at the
        !            97: [hier(7)](http://netbsd.gw.com/cgi-bin/man-cgi?hier+7+NetBSD-5.0.1+i386) man
        !            98: page, which describes in detail the layout of the filesystem used by NetBSD.
        !            99: 
        !           100:     # man hier
        !           101: 
        !           102: Other similar pages are
        !           103: [release(7)](http://netbsd.gw.com/cgi-bin/man-cgi?release+7+NetBSD-5.0.1+i386)
        !           104: and
        !           105: [pkgsrc(7)](http://netbsd.gw.com/cgi-bin/man-cgi?pkgsrc+7+NetBSD-5.0.1+i386).
        !           106: 
        !           107: Manual pages are divided in several sections, depending on what they document:
        !           108: 
        !           109:  1. general commands (tools and utilities), see
        !           110:     [intro(1)](http://netbsd.gw.com/cgi-bin/man-cgi?intro+1+NetBSD-5.0.1+i386)
        !           111:  2. system calls and error numbers, see
        !           112:     [intro(2)](http://netbsd.gw.com/cgi-bin/man-cgi?intro+2+NetBSD-5.0.1+i386)
        !           113:  3. C libraries, see
        !           114:     [intro(3)](http://netbsd.gw.com/cgi-bin/man-cgi?intro+3+NetBSD-5.0.1+i386)
        !           115:  4. special files and hardware support, see
        !           116:     [intro(4)](http://netbsd.gw.com/cgi-bin/man-cgi?intro+4+NetBSD-5.0.1+i386)
        !           117:  5. file formats, see
        !           118:     [intro(5)](http://netbsd.gw.com/cgi-bin/man-cgi?intro+5+NetBSD-5.0.1+i386)
        !           119:  6. games, see
        !           120:     [intro(6)](http://netbsd.gw.com/cgi-bin/man-cgi?intro+6+NetBSD-5.0.1+i386)
        !           121:  7. miscellaneous information pages, see
        !           122:     [intro(7)](http://netbsd.gw.com/cgi-bin/man-cgi?intro+7+NetBSD-5.0.1+i386)
        !           123:  8. system maintenance and operation commands, see
        !           124:     [intro(8)](http://netbsd.gw.com/cgi-bin/man-cgi?intro+8+NetBSD-5.0.1+i386)
        !           125:  9. kernel internals, see
        !           126:     [intro(9)](http://netbsd.gw.com/cgi-bin/man-cgi?intro+9+NetBSD-5.0.1+i386)
        !           127: 
        !           128: You can read the introduction to each of the sections by reading the `intro`
        !           129: page of the specific section (in this case, 8):
        !           130: 
        !           131:     # man 8 intro
        !           132: 
        !           133: A subject may appear in more than one section of the manual; to view a specific
        !           134: page, supply the section number as an argument to the man command. For example,
        !           135: `time` appears in section 1 (the time user command) and in section 3 (the time
        !           136: function of the C library). To see the man page for the time C function, write:
        !           137: 
        !           138:     # man 3 time
        !           139: 
        !           140: To see all the available pages:
        !           141: 
        !           142:     # man -w time
        !           143:     # man -a time
        !           144: 
        !           145: ## Editing configuration files
        !           146: 
        !           147: Other than a shell, a text editor is the most essential tool for NetBSD system
        !           148: administration.
        !           149: 
        !           150: Though there is the line-editor
        !           151: [ed(1)](http://netbsd.gw.com/cgi-bin/man-cgi?ed+1+NetBSD-5.0.1+i386), you might
        !           152: want to use the other editor provided with the NetBSD base system, named
        !           153: [vi(1)](http://netbsd.gw.com/cgi-bin/man-cgi?vi+1+NetBSD-5.0.1+i386). There is a
        !           154: [separate chapter](guide/edit) about using vi. You should read this first, as
        !           155: editing config files is essentially for using NetBSD.
        !           156: 
        !           157: Though vi(1) is *the* standard on Unix systems, you maybe want to get a bit used
        !           158: to ed(1). vi is an descendant of ed, and the commands used in ed are applicable
        !           159: for vi as well.
        !           160: 
        !           161: ## Login
        !           162: 
        !           163: For the first login you will use the `root` user, which is the only user defined
        !           164: at the end of the installation. At the password prompt type the password for
        !           165: root that you set during the installation. If you didn't set a password, just
        !           166: press `Enter`. Note that the password isn't echoed when you type it!
        !           167: 
        !           168:     NetBSD/i386 (Amnesiac) (ttyE0)
        !           169:     login: root
        !           170:     password:
        !           171:     We recommend creating a non-root account and using su(1) for 
        !           172:     root access.
        !           173:     #
        !           174: 
        !           175: ## Changing the `root` password
        !           176: 
        !           177: If you did not set a password for `root` during the installation, you should use
        !           178: the [passwd(1)](http://netbsd.gw.com/cgi-bin/man-cgi?vi+1+NetBSD-5.0.1+i386)
        !           179: command to do so now:
        !           180: 
        !           181:     # passwd
        !           182:     Changing local password for root.
        !           183:     New password:
        !           184:     Retype new password:
        !           185: 
        !           186: Passwords are not displayed on the screen while you type.
        !           187: 
        !           188: Choose a password that has numbers, digits, and special characters (not space)
        !           189: as well as from the upper and lower case alphabet. Do not choose any word in any
        !           190: language. It is common for an intruder to use dictionary attacks.
        !           191: Nonetheless, you should choose a password you can type independent of the
        !           192: keyboard layout. When using some special characters, you might have problems
        !           193: typing it with your local keymap later on.
        !           194: 
        !           195: ## Adding users
        !           196: 
        !           197: For security reasons, it is bad practice to login as root during regular use and
        !           198: maintenance of the system. Instead, administrators are encouraged to add a
        !           199: regular user, add the user to the `wheel` group, then use the
        !           200: [su(1)](http://netbsd.gw.com/cgi-bin/man-cgi?su+1+NetBSD-5.0.1+i386) command
        !           201: when root privileges are required. NetBSD offers the
        !           202: [useradd(8)](http://netbsd.gw.com/cgi-bin/man-cgi?useradd+8+NetBSD-5.0.1+i386)
        !           203: utility to create user accounts. For example, to create a new user:
        !           204: 
        !           205:     # useradd -m joe
        !           206: 
        !           207: The defaults for the useradd command can be changed; see the
        !           208: [useradd(8)](http://netbsd.gw.com/cgi-bin/man-cgi?useradd+8+NetBSD-5.0.1+i386)
        !           209: man page.
        !           210: 
        !           211: User accounts that can `su` to root are required to be in the `wheel` group.
        !           212: This can be done when the account is created by specifying a secondary group:
        !           213: 
        !           214:     # useradd -m -G wheel joe
        !           215: 
        !           216: As an alternative, the
        !           217: [usermod(8)](http://netbsd.gw.com/cgi-bin/man-cgi?usermod+8+NetBSD-5.0.1+i386)
        !           218: command can be used to add a user to an existing group:
        !           219: 
        !           220:     # usermod -G wheel joe
        !           221: 
        !           222: In case you just created a user but forgot to set a password, you can still do
        !           223: that later using
        !           224: [passwd(1)](http://netbsd.gw.com/cgi-bin/man-cgi?passwd+1+NetBSD-5.0.1+i386):
        !           225: 
        !           226:     # passwd joe
        !           227: 
        !           228: ### Note
        !           229: 
        !           230: You can edit `/etc/group` directly to add users to groups, but do *not* edit the
        !           231: `/etc/passwd` directly; use
        !           232: [vipw(8)](http://netbsd.gw.com/cgi-bin/man-cgi?vipw+8+NetBSD-5.0.1+i386).
        !           233: 
        !           234: ## Shadow passwords
        !           235: 
        !           236: Shadow passwords are enabled by default. This means is that all passwords in
        !           237: `/etc/passwd` are set to `\*`; the encrypted passwords are stored in a file that
        !           238: can only be read by root: `/etc/master.passwd`. When you start
        !           239: [vipw(8)](http://netbsd.gw.com/cgi-bin/man-cgi?vipw+8+NetBSD-5.0.1+i386) to edit
        !           240: the password file, the program opens a copy of `/etc/master.passwd`; when you
        !           241: exit, vipw checks the validity of the copy, creates a new `/etc/passwd` and
        !           242: installs the new `/etc/master.passwd` file. Finally, vipw launches
        !           243: [pwd\_mkdb(8)](http://netbsd.gw.com/cgi-bin/man-cgi?pwd_mkdb+8+NetBSD-5.0.1+i386),
        !           244: which creates the files `/etc/pwd.db` and `/etc/spwd.db`, two databases which
        !           245: are equivalent to `/etc/passwd` and `/etc/master.passwd` but faster to process.
        !           246: 
        !           247: It is very important to *always* use `vipw` and the other tools for account
        !           248: administration
        !           249: ([chfn(1)](http://netbsd.gw.com/cgi-bin/man-cgi?chfn+1+NetBSD-5.0.1+i386),
        !           250: [chsh(1)](http://netbsd.gw.com/cgi-bin/man-cgi?chsh+1+NetBSD-5.0.1+i386),
        !           251: [chpass(1)](http://netbsd.gw.com/cgi-bin/man-cgi?chpass+1+NetBSD-5.0.1+i386),
        !           252: [passwd(1)](http://netbsd.gw.com/cgi-bin/man-cgi?passwd+1+NetBSD-5.0.1+i386))
        !           253: and to *never* directly modify `/etc/master.passwd` or `/etc/passwd`.
        !           254: 
        !           255: ## Changing the keyboard layout
        !           256: 
        !           257: If you do not have a US layout keyboard, you probably want to change keymaps.
        !           258: For example, to use an italian keyboard, enter the following command:
        !           259: 
        !           260:     # wsconsctl -k -w encoding=it
        !           261:     encoding -> it
        !           262: 
        !           263: To save the keyboard layout permanently, add the following line to the
        !           264: `/etc/wscons.conf` file:
        !           265: 
        !           266:     encoding it
        !           267: 
        !           268: See [[Keyboard mappings|guide/cons#keyboard_mappings]] for a list of
        !           269: available keymaps.
        !           270: 
        !           271: ## System time
        !           272: 
        !           273: NetBSD, like all Unix systems, uses a system clock based on Greenwich time (GMT)
        !           274: and this is what you should set your system clock to. If you want to keep the
        !           275: system clock set to the local time (because, for example, you have a dual boot
        !           276: system with Windows installed), you must notify NetBSD by adding
        !           277: `rtclocaltime=YES` to `/etc/rc.conf`:
        !           278: 
        !           279:     # echo rtclocaltime=YES >> /etc/rc.conf
        !           280:     # sh /etc/rc.d/rtclocaltime restart
        !           281: 
        !           282: The number of minutes west of GMT is calculated automatically and is set in the
        !           283: `kern.rtc_offset` sysctl variable.
        !           284: 
        !           285: To display the current setting of the `kern.rtc_offset` variable:
        !           286: 
        !           287:     # sysctl kern.rtc_offset
        !           288:     kern.rtc_offset = -60
        !           289: 
        !           290: This automatic configuration only works if you have set the proper time zone by
        !           291: a symbolic link `/etc/localtime`. Normally this is done as part of the install
        !           292: procedure, but if for some reason it wasn't, you can set it by creating a
        !           293: symbolic link from `/etc/localtime` to a file in the `/usr/share/zoneinfo`
        !           294: directory.
        !           295: 
        !           296: The following example sets the time zone to Eastern Europe Summer Time:
        !           297: 
        !           298:     # ln -fs /usr/share/zoneinfo/Europe/Helsinki /etc/localtime
        !           299: 
        !           300: ## Secure Shell ([ssh(1)](http://netbsd.gw.com/cgi-bin/man-cgi?ssh+1+NetBSD-5.0.1+i386))
        !           301: 
        !           302: By default, all services are disabled in a fresh NetBSD installation, and
        !           303: [ssh(1)](http://netbsd.gw.com/cgi-bin/man-cgi?ssh+1+NetBSD-5.0.1+i386) is no
        !           304: exception. You may wish to enable it so you can log in to your system remotely.
        !           305: Set `sshd=YES` in `/etc/rc.conf` and then start the server with the command
        !           306: 
        !           307:     # /etc/rc.d/sshd start
        !           308: 
        !           309: The first time the server is started, it will generate a new keypair, which will
        !           310: be stored inside the directory `/etc/ssh`.
        !           311: 
        !           312: Note that you can enable sshd also by using the configuration menu of `sysinst`.
        !           313: If you did this, you don't have to do it by hand (and sshd should already have
        !           314: started at boot time).
        !           315: 
        !           316: ## Basic configuration in `/etc/rc.conf`
        !           317: 
        !           318: NetBSD uses `/etc/rc.conf` to determine what will be executed when the system
        !           319: boots. Understanding this file is important. The
        !           320: [rc.conf(5)](http://netbsd.gw.com/cgi-bin/man-cgi?rc.conf+5+NetBSD-5.0.1+i386)
        !           321: manual page contains a detailed description of all available options.
        !           322: 
        !           323: The `/etc/defaults/rc.conf` file contains the default values for most settings.
        !           324: To override a default value, the new value must be put into `/etc/rc.conf`. The
        !           325: definitions there override the ones in `/etc/defaults/rc.conf` (which you should
        !           326: leave unchanged).
        !           327: 
        !           328:     # man rc.conf
        !           329: 
        !           330: The first modifications are:
        !           331: 
        !           332:  * Set `rc_configured=YES` (this modification should already have been done by
        !           333:    the installation software.)
        !           334:  * Set `dhclient=YES` to configure your system's network using DHCP.
        !           335:  * Define a `hostname` for your machine (use a fully qualified hostname, i.e.,
        !           336:    one including domain). If you have a standalone machine you can use any name
        !           337:    (for example, `vigor3.your.domain`). If your machine is connected to a
        !           338:    network, you should supply the correct name.
        !           339:  * If your are connected to a local network or the Internet through a router,
        !           340:    set the `defaultroute` variable to the IP address of your router (sometimes
        !           341:    called a `default gateway`). For example, `defaultroute=192.168.1.1`.
        !           342: 
        !           343: ## Basic network settings
        !           344: 
        !           345: To resolve the names and IP addresses of remote hosts, the system needs access
        !           346: to a (remote or local) *DNS nameserver*. Tell the system which nameserver(s) to
        !           347: use by adding the IP address of one or more nameservers to the
        !           348: `/etc/resolv.conf` file, using the following as an example:
        !           349: 
        !           350:     nameserver 145.253.2.75
        !           351: 
        !           352: There are public name servers available, but your Internet Service Provider
        !           353: should always provide some to you anyway.
        !           354: 
        !           355: To set the names of local hosts that are not available through DNS, edit the
        !           356: `/etc/hosts` file, which has the form:
        !           357: 
        !           358:     IP-address  hostname  host
        !           359: 
        !           360: For example:
        !           361: 
        !           362:     192.168.1.3 vigor3.your.domain vigor3
        !           363: 
        !           364: ## Mounting a CD-ROM
        !           365: 
        !           366: New users are often surprised by the fact that although the installation program
        !           367: recognized and mounted their CD-ROM perfectly, the installed system seems to
        !           368: have "forgotten" how to use the CD-ROM. There is no special magic for using a
        !           369: CD-ROM; you can mount it like any other file system. All you need to know is the
        !           370: device name and some options to the
        !           371: [mount(8)](http://netbsd.gw.com/cgi-bin/man-cgi?mount+8+NetBSD-5.0.1+i386)
        !           372: command. You can find the device name with the aforementioned
        !           373: [dmesg(8)](http://netbsd.gw.com/cgi-bin/man-cgi?dmesg+8+NetBSD-5.0.1+i386)
        !           374: command. For example, if dmesg displays:
        !           375: 
        !           376:     # dmesg | grep ^cd
        !           377:     cd0 at atapibus0 drive 1: <ASUS CD-S400/A, , V2.1H> type 5 cdrom removable
        !           378: 
        !           379: the device name is `cd0`, and you can mount the CD-ROM with the following
        !           380: commands:
        !           381: 
        !           382:     # mkdir /cdrom
        !           383:     # mount -t cd9660 -o ro /dev/cd0a /cdrom
        !           384: 
        !           385: To make things easier, you can add a line to the `/etc/fstab` file:
        !           386: 
        !           387:     /dev/cd0a /cdrom cd9660 ro,noauto 0 0
        !           388: 
        !           389: Without the need to reboot, you can now mount the CD-ROM with:
        !           390: 
        !           391:     # mount /cdrom
        !           392: 
        !           393: When the CD-ROM is mounted you can't eject it manually; you will have to unmount
        !           394: it before you can do that:
        !           395: 
        !           396:     # umount /cdrom
        !           397: 
        !           398: There is also a software command which unmounts the CD-ROM and ejects it:
        !           399: 
        !           400:     # eject /dev/cd0a
        !           401: 
        !           402: ## Mounting a floppy
        !           403: 
        !           404: To mount a floppy you must know the name of the floppy device and the file
        !           405: system type of the floppy. Read the
        !           406: [fdc(4)](http://netbsd.gw.com/cgi-bin/man-cgi?fdc+4+NetBSD-5.0.1+i386) manpage
        !           407: for more information about device naming, as this will differ depending on the
        !           408: exact size and kind of your floppy disk. For example, to read and write a
        !           409: floppy in MS-DOS format you use the following command:
        !           410: 
        !           411:     # mount -t msdos /dev/fd0a /mnt
        !           412: 
        !           413: Instead of `/mnt`, you can use another directory of your choice; you could, for
        !           414: example, create a `/floppy` directory like you did for the CD-ROM. If you do a
        !           415: lot of work with MS-DOS floppies, you will want to install the
        !           416: [sysutils/mtools](http://pkgsrc.se/sysutils/mtools) package, which enables you
        !           417: to access a MS-DOS floppy (or hard disk partition) without the need to mount it.
        !           418: It is very handy for quickly copying a file to or from a floppy:
        !           419: 
        !           420:     # mcopy foo bar a:
        !           421:     # mcopy a:baz.txt baz
        !           422:     # mcopy a:\*.jpg .
        !           423: 
        !           424: ## Installing additional software
        !           425: 
        !           426: ### Using packages from pkgsrc
        !           427: 
        !           428: If you wish to install any of the software freely available for UNIX-like
        !           429: systems you are strongly advised to first check the NetBSD package system,
        !           430: [pkgsrc](http://www.pkgsrc.org). pkgsrc automatically handles any changes
        !           431: necessary to make the software run on NetBSD. This includes the retrieval and
        !           432: installation of any other packages on which the software may depend.
        !           433: 
        !           434: pkgsrc might have been installed already by `sysinst`, so you don't have to
        !           435: install it manually.
        !           436: 
        !           437:  * See the [list of available
        !           438:    packages](http://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/README-all.html)
        !           439: 
        !           440:  * Precompiled binaries are available on the NetBSD FTP server for some ports.
        !           441:    To install them the `PKG_PATH` variable needs to be adjusted in the following
        !           442:    way (under the
        !           443:    [sh(1)](http://netbsd.gw.com/cgi-bin/man-cgi?sh+1+NetBSD-5.0.1+i386) shell):
        !           444: 
        !           445:        # export PKG_PATH="http://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/<PORT>/<RELEASE-NUMBER>/All"
        !           446:        # export PKG_PATH
        !           447: 
        !           448:    Where `<RELEASE-NUMBER>` needs to be replaced by the release number of an
        !           449:    existing NetBSD release (for example, 6.1). `<PORT>` needs to be replaced by
        !           450:    the Port name for the used architecture (for example, amd64)
        !           451: 
        !           452:    Applications can now be installed by `root` with the pkg\_add command:
        !           453: 
        !           454:        # pkg_add -v perl
        !           455:        # pkg_add -v apache
        !           456:        # pkg_add -v firefox
        !           457:        # pkg_add -v kde
        !           458: 
        !           459:    The above commands will install the Perl programming language, Apache web
        !           460:    server, Firefox web browser and the KDE desktop environment as well as all
        !           461:    the packages they depend on.
        !           462: 
        !           463:    Installed applications can be updated in the following way:
        !           464: 
        !           465:        # pkg_add -uv firefox
        !           466: 
        !           467:    The following command will force an update of firefox and all of its
        !           468:    dependencies:
        !           469: 
        !           470:        # pkg_add -fuuv firefox
        !           471: 
        !           472:    All details about package management can be found in [*The pkgsrc
        !           473:    guide*](http://www.NetBSD.org/docs/pkgsrc/index.html)
        !           474: 
        !           475:  * Maybe you already installed
        !           476:    [pkgtools/pkgin](http://pkgsrc.se/pkgtools/pkgin). `sysinst` provides an
        !           477:    option to install pkgin (if not, you can install it like any other software).
        !           478:    `pkgin` is a binary package manager, but more sophisticated than `pkg_add`.
        !           479:    It maintains a database of packages on the server you can fetch with:
        !           480: 
        !           481:        # pkgin update
        !           482: 
        !           483:    Its usage is oriented on the package tools you have with other operating
        !           484:    systems. To search the package database for a word `stat`, use
        !           485:    
        !           486:        # pkgin search WORD
        !           487: 
        !           488:    To install a package (in this case `fscd`), just type
        !           489: 
        !           490:        # pkgin install fscd
        !           491: 
        !           492:    You should read the manpage to know about more actions you can do with pkgin.
        !           493: 
        !           494: ### Storing third-party software
        !           495: 
        !           496: On many UNIX-like systems the directory structure under `/usr/local` is reserved
        !           497: for applications and files which are independent of the system's software
        !           498: management. This convention is the reason why most software developers expect
        !           499: their software to be installed under `/usr/local`. NetBSD has no `/usr/local`
        !           500: directory, but it can be created manually if needed. NetBSD does not care about
        !           501: anything installed under `/usr/local`, so this task is left to you as the system
        !           502: administrator.
        !           503: 
        !           504: ### Security alerts
        !           505: 
        !           506: ## Security alerts
        !           507: 
        !           508: By the time that you have installed your system, it is quite likely that bugs in
        !           509: the release have been found. All significant and easily fixed problems will be
        !           510: reported at
        !           511: [http://www.NetBSD.org/support/security/](http://www.NetBSD.org/support/security/).
        !           512: It is recommended that you check this page regularly.
        !           513: 
        !           514: ## Stopping and rebooting the system
        !           515: 
        !           516: Use one of the following two shutdown commands to halt or reboot the system:
        !           517: 
        !           518:     # shutdown -h now
        !           519:     # shutdown -r now
        !           520: 
        !           521: Two other commands to perform the same tasks are:
        !           522: 
        !           523:     # halt
        !           524:     # reboot
        !           525: 
        !           526: halt, reboot and shutdown are not synonyms: the latter is more sophisticated. On
        !           527: a multiuser system you should really use shutdown, which allows you to schedule
        !           528: a shutdown time and notify users. It will also take care to stop processes
        !           529: properly. For more information, see the
        !           530: [shutdown(8)](http://netbsd.gw.com/cgi-bin/man-cgi?shutdown+8+NetBSD-5.0.1+i386),
        !           531: [halt(8)](http://netbsd.gw.com/cgi-bin/man-cgi?halt+8+NetBSD-5.0.1+i386) and
        !           532: [reboot(8)](http://netbsd.gw.com/cgi-bin/man-cgi?reboot+8+NetBSD-5.0.1+i386)
        !           533: manpages.
        !           534: 

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb