Use correct syntax markup for shell

Approved by:	carlavilla
This commit is contained in:
Li-Wen Hsu 2021-03-14 20:08:55 +08:00
parent 55c95407aa
commit a9a9e66105
No known key found for this signature in database
GPG key ID: 8D7BCC7D012FD37E
666 changed files with 17924 additions and 17924 deletions

View file

@ -352,14 +352,14 @@ H {re} δίνει στην κυκλοφορία μια καινούρια έκδ
Αν το ξέρετε αυτό μπορείτε να χρησιμοποιήσετε την ακόλουθη εντολή για να εγκαταστήσετε το πακέτο του Αγγλικού PDF FAQ:
[source,bash]
[source,shell]
....
# pkg_add ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/packages/faq.en_US.ISO8859-1.pdf.tgz
....
Αφού το κάνετε αυτό, μπορείτε να χρησιμοποιήσετε την εντολή man:pkg_info[1] για να βρείτε που έχει εγκατασταθεί το αρχείο.
[source,bash]
[source,shell]
....
# pkg_info -f faq.en_US.ISO8859-1.pdf
Information for faq.en_US.ISO8859-1.pdf:
@ -379,7 +379,7 @@ File: +DESC (ignored)
Για παράδειγμα, η έκδοση του FAQ σε συνδεδεμένα αρχεία HTML, συμπιεσμένη με χρήση του man:bzip2[1], μπορεί να βρεθεί στο αρχείο [.filename]#doc/en_US.ISO8859-1/books/faq/book.html-split.tar.bz2#. Για να κατεβάσετε και να αποσυμπιέσετε αυτό το αρχείο θα πρέπει να κάνετε το παρακάτω:
[source,bash]
[source,shell]
....
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/en_US.ISO8859-1/books/faq/book.html-split.tar.bz2
# bzip2 -d book.html-split.tar.bz2
@ -478,7 +478,7 @@ File: +DESC (ignored)
* Εκτελώντας το DOS, μετακινηθείτε στον κατάλογο tools/ της FreeBSD διανομής σας, και ψάξτε για το αρχείο [.filename]#bootinst.exe#. Εκτελέστε το όπως φαίνεται παρακάτω:
+
[source,bash]
[source,shell]
....
...\TOOLS> bootinst.exe boot.bin
....
@ -487,7 +487,7 @@ File: +DESC (ignored)
* Ξεκινήστε ξανά χρησιμοποιώντας τη δισκέτα εκκίνησης του FreeBSD και πηγαίνετε στην επιλογή Custom Installation του μενού. Επιλέξτε Partition. Επιλέξτε τον οδηγό που κανονικά θα περιείχε τον διαχειριστή εκκίνησης σας (φυσιολογικά τον πρώτο) και όταν φτάσετε στον επεξεργαστή κατατμήσεων (partition editor) για τον οδηγό αυτό, το πρώτο πράγμα που θα κάνετε (χωρίς άλλες αλλαγές), είναι να επιλέξετε (W)rite. Επιλέξτε yes στην επιβεβαίωση που θα εμφανιστεί και όταν φτάσετε στην προτροπή επιλογής Διαχειριστή Εκκίνησης, επιλέξτε "Boot Manager". Με τον τρόπο αυτό ο διαχειριστής εκκίνησης θα γραφεί ξανά στο δίσκο. Μπορείτε τώρα να βγείτε από το μενού της εγκατάστασης και να επανεκκινήσετε από το σκληρό δίσκο, όπως συνήθως.
* Ξεκινήστε με τη βοήθεια της δισκέτας εκκίνησης (ή του CD) του FreeBSD και επιλέξτε "Fixit" από το μενού. Επιλέξτε είτε τη δισκέτα Fixit είτε το CD #2 (το "live" σύστημα αρχείων) και θα εισέλθετε στο κέλυφος fixit. Εκτελέστε έπειτα την ακόλουθη εντολή:
+
[source,bash]
[source,shell]
....
Fixit# fdisk -B -b /boot/boot0 bootdevice
....
@ -545,7 +545,7 @@ Fixit# fdisk -B -b /boot/boot0 bootdevice
. Γράψτε τα αρχεία [.filename]#boot1# και [.filename]#boot2# στο τοπικό σύστημα αρχείων.
. Χρησιμοποιήστε το man:disklabel[8] για να γράψετε τα [.filename]#boot1# και [.filename]#boot2# στο slice του FreeBSD.
+
[source,bash]
[source,shell]
....
# disklabel -B -b boot1 -s boot2 ad0sn
....
@ -721,21 +721,21 @@ options PAE
Δοκιμάστε να απενεργοποιήσετε την υποστήριξη ACPI. Μόλις ξεκινήσει ο φορτωτής εκκίνησης, πιέστε το πλήκτρο space. To σύστημα σας θα εμφανίσει
[source,bash]
[source,shell]
....
OK
....
. Γράψτε
[source,bash]
[source,shell]
....
unset acpi_load
....
και κατόπιν
[source,bash]
[source,shell]
....
boot
....
@ -839,14 +839,14 @@ OK
Αν θέλετε να χρησιμοποιήσετε το USB πληκτρολόγιο στην κονσόλα, θα πρέπει να δηλώσετε συγκεκριμένα στον οδηγό της κονσόλας να χρησιμοποιήσει το υπάρχον USB πληκτρολόγιο. Αυτό μπορεί να γίνει εκτελώντας την ακόλουθη εντολή ως μέρος της διαδικασίας αρχικοποίησης του συστήματος:
[source,bash]
[source,shell]
....
# kbdcontrol -k /dev/kbd1 < /dev/ttyv0 > /dev/null
....
Παρατηρήστε ότι αν το πληκτρολόγιο USB είναι το μοναδικό πληκτρολόγιο, θα είναι διαθέσιμο ως [.filename]#/dev/ukbd0#, και η εντολή θα δείχνει όπως παρακάτω:
[source,bash]
[source,shell]
....
# kbdcontrol -k /dev/ukbd0 < /dev/ttyv0 > /dev/null
....
@ -883,7 +883,7 @@ device psm0 at atkbdc? irq 12
Μόλις ο πυρήνας ανιχνεύσει σωστά τη συσκευή [.filename]#psm0# κατά την εκκίνηση, βεβαιωθείτε ότι υπάρχει η αντίστοιχη καταχώρηση για το [.filename]#psm0# στον κατάλογο [.filename]#/dev#. Μπορείτε να το δημιουργήσετε γράφοντας:
[source,bash]
[source,shell]
....
# cd /dev; sh MAKEDEV psm0
....
@ -900,7 +900,7 @@ device psm0 at atkbdc? irq 12
Αν χρησιμοποιείτε το προεπιλεγμένο πρόγραμμα οδήγησης κονσόλας, man:syscons[4], μπορείτε να χρησιμοποιήσετε το δείκτη του ποντικιού σας σε κονσόλες κειμένου για να κάνετε αποκοπή και επικόλληση κειμένου. Εκτελέστε τον δαίμονα του ποντικιού, man:moused[8], και ενεργοποιήστε το δείκτη του ποντικιού στην εικονική κονσόλα:
[source,bash]
[source,shell]
....
# moused -p /dev/xxxx -t yyyy
# vidcontrol -m on
@ -999,7 +999,7 @@ To FreeBSD υποστηρίζει αρκετά software modems με την βο
Κάποιες κάρτες ήχου, όπως η es1370, μηδενίζουν την ένταση του ήχου σε κάθε εκκίνηση. Πρέπει να εκτελείτε την ακόλουθη εντολή κάθε φορά που ξεκινά το μηχάνημα:
[source,bash]
[source,shell]
....
# mixer pcm 100 vol 100 cd 100
....
@ -1021,7 +1021,7 @@ To FreeBSD υποστηρίζει αρκετά software modems με την βο
Προσθέστε τη γραμμή
[source,bash]
[source,shell]
....
hint.acpi.0.disabled="1"
....
@ -1086,7 +1086,7 @@ device card 1
Για να ενεργοποιήσετε την επανατοποθέτηση χαλασμένων τομέων, επεξεργαστείτε την πρώτη σελίδα κατάστασης της συσκευής (modepage), δίνοντας την παρακάτω εντολή (ως `root`):
[source,bash]
[source,shell]
....
# camcontrol modepage sd0 -m 1 -e -P 3
....
@ -1231,7 +1231,7 @@ quit
Αν σας συμβεί αυτό, επανεκκινήστε σε κατάσταση ενός χρήστη (single user) και γράψτε:
[source,bash]
[source,shell]
....
# rm /var/db/kvm_*.db
....
@ -1288,7 +1288,7 @@ quit
Αν το πρόβλημα δεν μπορεί να λυθεί με διαφορετικό τρόπο, η λύση είναι να ορίσετε την παρακάτω μεταβλητή του sysctl:
[source,bash]
[source,shell]
....
# sysctl -w kern.timecounter.method=1
....
@ -1319,7 +1319,7 @@ ____
Για να λειτουργήσει ξανά η συσκευή, πρέπει να βρεθεί το PNP id της και να προστεθεί στη λίστα των ανιχνεύσεων ISA που χρησιμοποιούνται για την αναγνώριση PnP συσκευών. Αυτό μπορεί να γίνει με τη χρήση της man:pnpinfo[8] για την ανίχνευση της συσκευής, για παράδειγμα αυτή είναι η έξοδος της man:pnpinfo[8] για ένα εσωτερικό modem:
[source,bash]
[source,shell]
....
# pnpinfo
Checking for Plug-n-Play devices...
@ -1339,7 +1339,7 @@ TAG Start DF
[παραλείπονται οι υπόλοιπες γραμμές TAG]
[source,bash]
[source,shell]
....
TAG End DF
End Tag
@ -1360,7 +1360,7 @@ IO range check 0x00 activate 0x01
Εναλλακτικά, αν το man:pnpinfo[8] δεν δείχνει την ζητούμενη κάρτα, μπορείτε να χρησιμοποιήσετε το man:pciconf[8]. Παρακάτω φαίνεται ένα μέρος της εξόδου της `pciconf -vl` για ένα κύκλωμα ήχου ενσωματωμένου στη μητρική:
[source,bash]
[source,shell]
....
# pciconf -vl
chip1@pci0:31:5: class=0x040100 card=0x00931028 chip=0x24158086 rev=0x02 hdr=0x00
@ -1435,7 +1435,7 @@ static struct isa_pnp_id sio_ids[] = {
Εκτελέστε την man:dmesg[8], και ελέγξτε για γραμμές που περιέχουν την λέξη `Timecounter`. Η τελευταία από τις γραμμές που θα εκτυπωθεί δείχνει το ρολόι που επιλέχθηκε από το FreeBSD και σχεδόν σίγουρα θα είναι το `TSC`.
[source,bash]
[source,shell]
....
# dmesg | grep Timecounter
Timecounter "i8254" frequency 1193182 Hz
@ -1444,7 +1444,7 @@ Timecounter "TSC" frequency 595573479 Hz
Μπορείτε να το επιβεβαιώσετε αυτό, ελέγχοντας την τιμή του `kern.timecounter.hardware` man:sysctl[3].
[source,bash]
[source,shell]
....
# sysctl kern.timecounter.hardware
kern.timecounter.hardware: TSC
@ -1454,7 +1454,7 @@ kern.timecounter.hardware: TSC
Στο παράδειγμα μας, είναι επίσης διαθέσιμο το ρολόι `i8254` και μπορείτε να το επιλέξετε γράφοντας το όνομα του στο man:sysctl[3] `kern.timecounter.hardware`.
[source,bash]
[source,shell]
....
# sysctl -w kern.timecounter.hardware=i8254
kern.timecounter.hardware: TSC -> i8254
@ -1690,7 +1690,7 @@ FreeBSD does not include a port upgrading tool, but it does have some tools to m
The man:pkg_version[1] command can generate a script that will update installed ports to the latest version in the ports tree.
[source,bash]
[source,shell]
....
# pkg_version -c > /tmp/myscript
....
@ -1728,7 +1728,7 @@ If you only update parts of the Ports Collection, using one of its CVSup subcoll
To create audio CDs from MIDI files, first install package:audio/timidity[] from ports then install manually the GUS patches set by Eric A. Welsh, available at http://www.stardate.bc.ca/eawpatches/html/default.htm[http://www.stardate.bc.ca/eawpatches/html/default.htm]. After timidity++ has been installed properly, midi files may be converted to wav files with the following command line:
[source,bash]
[source,shell]
....
% timidity -Ow -s 44100 -o /tmp/juke/01.wav 01.mid
....
@ -1796,7 +1796,7 @@ There are a number of possible causes for this problem. They are, in no particul
If you are running FreeBSD version 5.2.1 or earlier, check for the existence of the `kern.quantum` sysctl. If you have it, you should see something like this:
[source,bash]
[source,shell]
....
% sysctl kern.quantum
kern.sched.quantum: 99960
@ -1804,7 +1804,7 @@ kern.sched.quantum: 99960
If the `kern.quantum` sysctl exists, you are using the 4BSD scheduler. If not, you will get an error printed by man:sysctl[8] (which you can safely ignore):
[source,bash]
[source,shell]
....
% sysctl kern.sched.quantum
sysctl: unknown oid 'kern.sched.quantum'
@ -1812,7 +1812,7 @@ sysctl: unknown oid 'kern.sched.quantum'
In FreeBSD version 5.3-RELEASE and later, the name of the scheduler currently being used is directly available as the value of the `kern.sched.name` sysctl:
[source,bash]
[source,shell]
....
% sysctl kern.sched.name
kern.sched.name: 4BSD
@ -1849,7 +1849,7 @@ You should never use anything but man:dump[8] and man:restore[8] to move the roo
For example, if you are going to move root to [.filename]#/dev/ad1s1a#, with [.filename]#/mnt# as the temporary mount point, it is:
[source,bash]
[source,shell]
....
# newfs /dev/ad1s1a
# mount /dev/ad1s1a /mnt
@ -1859,7 +1859,7 @@ For example, if you are going to move root to [.filename]#/dev/ad1s1a#, with [.f
Rearranging your partitions with dump takes a bit more work. To merge a partition like [.filename]#/var# into its parent, create the new partition large enough for both, move the parent partition as described above, then move the child partition into the empty directory that the first move created:
[source,bash]
[source,shell]
....
# newfs /dev/ad1s1a
# mount /dev/ad1s1a /mnt
@ -1871,7 +1871,7 @@ Rearranging your partitions with dump takes a bit more work. To merge a partitio
To split a directory from its parent, say putting [.filename]#/var# on its own partition when it was not before, create both partitions, then mount the child partition on the appropriate directory in the temporary mount point, then move the old single partition:
[source,bash]
[source,shell]
....
# newfs /dev/ad1s1a
# newfs /dev/ad1s1d
@ -1904,14 +1904,14 @@ Once you have got the BIOS and FreeBSD agreeing about the geometry of the disk,
To return a "dangerously dedicated" disk for normal PC use, there are basically two options. The first is, you write enough NULL bytes over the MBR to make any subsequent installation believe this to be a blank disk. You can do this for example with
[source,bash]
[source,shell]
....
# dd if=/dev/zero of=/dev/rda0 count=15
....
Alternatively, the undocumented DOS "feature"
[source,bash]
[source,shell]
....
C:\> fdisk /mbr
....
@ -1938,7 +1938,7 @@ Vital information on the root partition changes very rarely. Files such as [.fil
The symptom of this is:
[source,bash]
[source,shell]
....
# ccdconfig -C
ccdconfig: ioctl (CCDIOCSET): /dev/ccd0c: Inappropriate file type or format
@ -1950,7 +1950,7 @@ This usually happens when you are trying to concatenate the `c` partitions, whic
The symptom of this is:
[source,bash]
[source,shell]
....
# disklabel ccd0
(it prints something sensible here, so let us try to edit it)
@ -1962,7 +1962,7 @@ use "disklabel -r" to install initial label
This is because the disklabel returned by ccd is actually a "fake" one that is not really on the disk. You can solve this problem by writing it back explicitly, as in:
[source,bash]
[source,shell]
....
# disklabel ccd0 > /tmp/disklabel.tmp
# disklabel -Rr ccd0 /tmp/disklabel.tmp
@ -1995,7 +1995,7 @@ FreeBSD also supports network filesystems such as NFS (see man:mount_nfs[8]), Ne
The secondary DOS partitions are found after ALL the primary partitions. For example, if you have an "E" partition as the second DOS partition on the second SCSI drive, you need to create the special files for "slice 5" in [.filename]#/dev#, then mount [.filename]#/dev/da1s5#:
[source,bash]
[source,shell]
....
# cd /dev
# sh MAKEDEV da1s5
@ -2065,7 +2065,7 @@ other=/dev/dab4
In some cases you may need to specify the BIOS drive number to the FreeBSD boot loader to successfully boot off the second disk. For example, if your FreeBSD SCSI disk is probed by BIOS as BIOS disk 1, at the FreeBSD boot loader prompt you need to specify:
[source,bash]
[source,shell]
....
Boot: 1:da(0,a)/kernel
....
@ -2105,14 +2105,14 @@ Whether it is a removable drive like a Zip(R) or an EZ drive (or even a floppy,
If it is a ZIP drive or a floppy, you have already got a DOS filesystem on it, you can use a command like this:
[source,bash]
[source,shell]
....
# mount -t msdosfs /dev/fd0c /floppy
....
if it is a floppy, or this:
[source,bash]
[source,shell]
....
# mount -t msdosfs /dev/da2s4 /zip
....
@ -2125,7 +2125,7 @@ The rest of the examples will be for a ZIP drive on da2, the third SCSI disk.
Unless it is a floppy, or a removable you plan on sharing with other people, it is probably a better idea to stick a BSD filesystem on it. You will get long filename support, at least a 2X improvement in performance, and a lot more stability. First, you need to redo the DOS-level partitions/filesystems. You can either use man:fdisk[8] or [.filename]#/stand/sysinstall#, or for a small drive that you do not want to bother with multiple operating system support on, just blow away the whole FAT partition table (slices) and just use the BSD partitioning:
[source,bash]
[source,shell]
....
# dd if=/dev/zero of=/dev/rda2 count=2
# disklabel -Brw da2 auto
@ -2135,14 +2135,14 @@ You can use disklabel or [.filename]#/stand/sysinstall# to create multiple BSD p
Finally, create a new filesystem, this one is on our ZIP drive using the whole disk:
[source,bash]
[source,shell]
....
# newfs /dev/rda2c
....
and mount it:
[source,bash]
[source,shell]
....
# mount /dev/da2c /zip
....
@ -2191,7 +2191,7 @@ Ordinary users can be permitted to mount devices. Here is how:
. As `root` set the sysctl variable `vfs.usermount` to `1`.
+
[source,bash]
[source,shell]
....
# sysctl -w vfs.usermount=1
....
@ -2200,14 +2200,14 @@ Ordinary users can be permitted to mount devices. Here is how:
+
For example, to allow users to mount the first floppy drive, use:
+
[source,bash]
[source,shell]
....
# chmod 666 /dev/fd0
....
+
To allow users in the group `operator` to mount the CDROM drive, use:
+
[source,bash]
[source,shell]
....
# chgrp operator /dev/acd0c
# chmod 640 /dev/acd0c
@ -2238,7 +2238,7 @@ perm /dev/acd0 0660
All users can now mount the floppy [.filename]#/dev/fd0# onto a directory that they own:
[source,bash]
[source,shell]
....
% mkdir ~/my-mount-point
% mount -t msdosfs /dev/fd0 ~/my-mount-point
@ -2246,7 +2246,7 @@ All users can now mount the floppy [.filename]#/dev/fd0# onto a directory that t
Users in group `operator` can now mount the CDROM [.filename]#/dev/acd0c# onto a directory that they own:
[source,bash]
[source,shell]
....
% mkdir ~/my-mount-point
% mount -t cd9660 /dev/acd0c ~/my-mount-point
@ -2254,7 +2254,7 @@ Users in group `operator` can now mount the CDROM [.filename]#/dev/acd0c# onto a
Unmounting the device is simple:
[source,bash]
[source,shell]
....
% umount ~/my-mount-point
....
@ -2300,7 +2300,7 @@ The primary configuration file is [.filename]#/etc/defaults/rc.conf# (see man:rc
For example, if you wish to start named, the included DNS server, all you need to do is:
[source,bash]
[source,shell]
....
# echo named_enable="YES" >> /etc/rc.conf
....
@ -2317,7 +2317,7 @@ To remove the user, use the man:rmuser[8] command or, if necessary, man:pw[8].
This is normally caused by editing the system crontab ([.filename]#/etc/crontab#) and then using man:crontab[1] to install it:
[source,bash]
[source,shell]
....
# crontab /etc/crontab
....
@ -2326,7 +2326,7 @@ This is not the correct way to do things. The system crontab has a different for
If this is what you did, the extra crontab is simply a copy of [.filename]#/etc/crontab# in the wrong format it. Delete it with the command:
[source,bash]
[source,shell]
....
# crontab -r
....
@ -2436,7 +2436,7 @@ in the configuration file. If you use the PCVT console driver, use the following
This can also be done by setting the following sysctl which does not require a reboot or kernel recompile:
[source,bash]
[source,shell]
....
# sysctl hw.syscons.kbd_reboot=0
....
@ -2450,7 +2450,7 @@ options PCVT_CTRL_ALT_DEL
Use this perl command:
[source,bash]
[source,shell]
....
% perl -i.bak -npe 's/\r\n/\n/g' file ...
....
@ -2459,7 +2459,7 @@ file is the file(s) to process. The modification is done in-place, with the orig
Alternatively you can use the man:tr[1] command:
[source,bash]
[source,shell]
....
% tr -d '\r' < dos-text-file > unix-file
....
@ -2478,7 +2478,7 @@ The error comes from the Kerberos distributed authentication system. The problem
To remove Kerberos from the system, reinstall the bin distribution for the release you are running. If you have the CDROM, you can mount the cd (we will assume on /cdrom) and run
[source,bash]
[source,shell]
....
# cd /cdrom/bin
# ./install.sh
@ -2509,7 +2509,7 @@ pseudo-device pty 256
in the configuration file.
. Run the commands
+
[source,bash]
[source,shell]
....
# cd /dev
# sh MAKEDEV pty{1,2,3,4,5,6,7}
@ -2533,7 +2533,7 @@ There is no [.filename]#snd# device. The name is used as a shorthand for the var
To create these devices you should
[source,bash]
[source,shell]
....
# cd /dev
# sh MAKEDEV snd0
@ -2550,7 +2550,7 @@ Go into single user mode and then back to multi user mode.
On the console do:
[source,bash]
[source,shell]
....
# shutdown now
(Note: without -r or -h)
@ -2575,7 +2575,7 @@ Short answer: You are probably at security level greater than 0. Reboot directly
Long answer: FreeBSD disallows changing system flags at security levels greater than 0. You can check your security level with the command:
[source,bash]
[source,shell]
....
# sysctl kern.securelevel
....
@ -2588,7 +2588,7 @@ Short answer: You are probably at security level greater than 1. Reboot directly
Long answer: FreeBSD disallows changing the time by more that one second at security levels greater than 1. You can check your security level with the command:
[source,bash]
[source,shell]
....
# sysctl kern.securelevel
....
@ -2718,7 +2718,7 @@ Section "InputDevice"
Some people prefer to use [.filename]#/dev/mouse# under X. To make this work, [.filename]#/dev/mouse# should be linked to [.filename]#/dev/sysmouse# (see man:sysmouse[4]):
[source,bash]
[source,shell]
....
# cd /dev
# rm -f mouse
@ -2766,7 +2766,7 @@ For security reasons, the default setting is to not allow a machine to remotely
To enable this feature, simply start X with the optional `-listen_tcp` argument:
[source,bash]
[source,shell]
....
% startx -listen_tcp
....
@ -2845,7 +2845,7 @@ ttyvb "/usr/libexec/getty Pc" cons25 off secure
Next, the easiest (and cleanest) way to activate the virtual consoles is to reboot. However, if you really do not want to reboot, you can just shut down the X Window system and execute (as `root`):
[source,bash]
[source,shell]
....
# kill -HUP 1
....
@ -2918,14 +2918,14 @@ and notice that your mouse does not work properly.
If this happens, disable the synchronization check code by setting the driver flags for the PS/2 mouse driver to 0x100. Enter _UserConfig_ by giving the `-c` option at the boot prompt:
[source,bash]
[source,shell]
....
boot: -c
....
Then, in the _UserConfig_ command line, type:
[source,bash]
[source,shell]
....
UserConfig> flags psm0 0x100
UserConfig> quit
@ -2937,14 +2937,14 @@ There have been some reports that certain model of PS/2 mouse from MouseSystems
Specify the flags 0x04 to the PS/2 mouse driver to put the mouse into the high resolution mode. Enter _UserConfig_ by giving the `-c` option at the boot prompt:
[source,bash]
[source,shell]
....
boot: -c
....
Then, in the _UserConfig_ command line, type:
[source,bash]
[source,shell]
....
UserConfig> flags psm0 0x04
UserConfig> quit
@ -3012,7 +3012,7 @@ Assuming all "Windows(R)" keyboards are standard then the keycodes for the 3 key
To have the left Windows(R) key print a comma, try this.
[source,bash]
[source,shell]
....
# xmodmap -e "keycode 115 = comma"
....
@ -3096,14 +3096,14 @@ Because they are not necessary. In the Berkeley networking framework, network in
If the alias is on the same subnet as an address already configured on the interface, then add `netmask 0xffffffff` to your man:ifconfig[8] command-line, as in the following:
[source,bash]
[source,shell]
....
# ifconfig ed0 alias 192.0.2.2 netmask 0xffffffff
....
Otherwise, just specify the network address and netmask as usual:
[source,bash]
[source,shell]
....
# ifconfig ed0 alias 172.16.141.5 netmask 0xffffff00
....
@ -3122,7 +3122,7 @@ See link:{handbook}#network-nfs/[ the Handbook entry on NFS] for more informatio
Some versions of the Linux(R) NFS code only accept mount requests from a privileged port; try
[source,bash]
[source,shell]
....
# mount -o -P linuxbox:/blah /mnt
....
@ -3131,7 +3131,7 @@ Some versions of the Linux(R) NFS code only accept mount requests from a privile
Sun(TM) workstations running SunOS(TM) 4.X only accept mount requests from a privileged port; try
[source,bash]
[source,shell]
....
# mount -o -P sunbox:/blah /mnt
....
@ -3246,7 +3246,7 @@ If you have compiled your kernel with the `IPFIREWALL` option, you need to be aw
If you had unintentionally misconfigured your system for firewalling, you can restore network operability by typing the following while logged in as `root`:
[source,bash]
[source,shell]
....
# ipfw add 65534 allow all from any to any
....
@ -3263,7 +3263,7 @@ Please see the Handbook's link:{handbook}#firewalls/[Firewalls] section, specifi
Possibly because you want to do network address translation (NAT) and not just forward packets. A "fwd" rule does exactly what it says; it forwards packets. It does not actually change the data inside the packet. Say we have a rule like:
[source,bash]
[source,shell]
....
01000 fwd`10.0.0.1`
from any to`foo 21`
@ -3299,7 +3299,7 @@ pseudo-device bpf # Berkeley Packet Filter
On FreeBSD 4.X and earlier, you must also create the device node. After rebooting, go to the [.filename]#/dev# directory and run:
[source,bash]
[source,shell]
....
# sh MAKEDEV bpf0
....
@ -3319,14 +3319,14 @@ This is the kernel telling you that some activity is provoking it to send more I
The first number in the message tells you how many packets the kernel would have sent if the limit was not in place, and the second number tells you the limit. You can control the limit using the `net.inet.icmp.icmplim` sysctl variable like this, where `300` is the limit in packets per second:
[source,bash]
[source,shell]
....
# sysctl -w net.inet.icmp.icmplim=300
....
If you do not want to see messages about this in your log files, but you still want the kernel to do response limiting, you can use the `net.inet.icmp.icmplim_output` sysctl variable to disable the output like this:
[source,bash]
[source,shell]
....
# sysctl -w net.inet.icmp.icmplim_output=0
....
@ -3386,7 +3386,7 @@ The securelevel is a security mechanism implemented in the kernel. Basically, wh
To check the status of the securelevel on a running system, simply execute the following command:
[source,bash]
[source,shell]
....
# sysctl kern.securelevel
....
@ -3438,7 +3438,7 @@ Some people use `toor` for day-to-day `root` tasks with a non-standard shell, le
For security reasons, `suidperl` is installed without the suid bit by default. The system administrator can enable suid behavior with the following command.
[source,bash]
[source,shell]
....
# chmod u+s /usr/bin/suidperl
....
@ -3793,7 +3793,7 @@ ATDT1234567
Ppp (or any other program for that matter) should never dump core. Because man:ppp[8] runs with an effective user id of 0, the operating system will not write man:ppp[8]'s core image to disk before terminating it. If, however man:ppp[8] is actually terminating due to a segmentation violation or some other signal that normally causes core to be dumped, _and_ you are sure you are using the latest version (see the start of this section), then you should do the following:
[source,bash]
[source,shell]
....
% tar xfz ppp-*.src.tar.gz
% cd ppp*/ppp
@ -3809,7 +3809,7 @@ You will now have a debuggable version of man:ppp[8] installed. You will have to
Now, if and when man:ppp[8] receives the segmentation violation, it will dump a core file called [.filename]#ppp.core#. You should then do the following:
[source,bash]
[source,shell]
....
% su
# gdb /usr/sbin/ppp ppp.core
@ -3947,7 +3947,7 @@ This section answers common questions about serial communications with FreeBSD.
As the FreeBSD kernel boots, it will probe for the serial ports in your system for which the kernel was configured. You can either watch your system closely for the messages it prints or run the command
[source,bash]
[source,shell]
....
% dmesg | grep sio
....
@ -4003,14 +4003,14 @@ Not yet. You will have to use a different irq for each card.
The [.filename]#ttydX# (or [.filename]#cuaaX#) device is the regular device you will want to open for your applications. When a process opens the device, it will have a default set of terminal I/O settings. You can see these settings with the command
[source,bash]
[source,shell]
....
# stty -a -f /dev/ttyd1
....
When you change the settings to this device, the settings are in effect until the device is closed. When it is reopened, it goes back to the default set. To make changes to the default set, you can open and adjust the settings of the "initial state" device. For example, to turn on CLOCAL mode, 8 bits, and XON/XOFF flow control by default for ttyd5, do:
[source,bash]
[source,shell]
....
# stty -f /dev/ttyid5 clocal cs8 ixon ixoff
....
@ -4019,7 +4019,7 @@ A good place to do this is in [.filename]#/etc/rc.serial#. Now, an application w
You can also prevent certain settings from being changed by an application by making adjustments to the "lock state" device. For example, to lock the speed of [.filename]#ttyd5# to 57600 bps, do
[source,bash]
[source,shell]
....
# stty -f /dev/ttyld5 57600
....
@ -4054,14 +4054,14 @@ It is common practice to use `dialup` as the terminal type. Many users set up in
After making modifications to [.filename]#/etc/ttys#, you need to send a hangup or HUP signal to the man:init[8] process:
[source,bash]
[source,shell]
....
# kill -HUP 1
....
This forces the man:init[8] process to reread [.filename]#/etc/ttys#. The init process will then start getty processes on all `on` ports. You can find out if logins are available for your port by typing
[source,bash]
[source,shell]
....
% ps -ax | grep '[t]tyd1'
....
@ -4092,7 +4092,7 @@ On your system, the programs man:tip[1] and man:cu[1] are probably executable on
Alternatively, you can let everyone on your system run man:tip[1] and man:cu[1] by typing:
[source,bash]
[source,shell]
....
# chmod 4511 /usr/bin/cu
# chmod 4511 /usr/bin/tip
@ -4123,7 +4123,7 @@ Use the highest bps rate your modem supports in the br capability. Then, type `t
If there is no [.filename]#/dev/cuaa0# on your system, do this:
[source,bash]
[source,shell]
....
# cd /dev
# sh MAKEDEV cuaa0
@ -4131,7 +4131,7 @@ If there is no [.filename]#/dev/cuaa0# on your system, do this:
Or use cu as `root` with the following command:
[source,bash]
[source,shell]
....
# cu -lline -sspeed
....
@ -4278,7 +4278,7 @@ The simple answer is that free memory is wasted memory. Any memory that your pro
Symlinks do not have permissions, and by default, man:chmod[1] will not follow symlinks to change the permissions on the target file. So if you have a file, [.filename]#foo#, and a symlink to that file, [.filename]#bar#, then this command will always succeed.
[source,bash]
[source,shell]
....
% chmod g-w bar
....
@ -4292,7 +4292,7 @@ You have to use either `-H` or `-L` together with the `-R` option to make this w
The `-R` option does a _RECURSIVE_ man:chmod[1]. Be careful about specifying directories or symlinks to directories to man:chmod[1]. If you want to change the permissions of a directory referenced by a symlink, use man:chmod[1] without any options and follow the symlink with a trailing slash ([.filename]#/#). For example, if [.filename]#foo# is a symlink to directory [.filename]#bar#, and you want to change the permissions of [.filename]#foo# (actually [.filename]#bar#), you would do something like:
[source,bash]
[source,shell]
....
% chmod 555 foo/
....
@ -4635,14 +4635,14 @@ What you should do is this:
. Write down the instruction pointer value. Note that the `0x8:` part at the beginning is not significant in this case: it is the `0xf0xxxxxx` part that we want.
. When the system reboots, do the following:
+
[source,bash]
[source,shell]
....
% nm -n /kernel.that.caused.the.panic | grep f0xxxxxx
....
+
where `f0xxxxxx` is the instruction pointer value. The odds are you will not get an exact match since the symbols in the kernel symbol table are for the entry points of functions and the instruction pointer address will be somewhere inside a function, not at the start. If you do not get an exact match, omit the last digit from the instruction pointer value and try again, i.e.:
+
[source,bash]
[source,shell]
....
% nm -n /kernel.that.caused.the.panic | grep f0xxxxx
....
@ -4676,7 +4676,7 @@ FreeBSD crash dumps are usually the same size as the physical RAM size of your m
Once you have recovered the crash dump, you can get a stack trace with man:gdb[1] as follows:
[source,bash]
[source,shell]
....
% gdb -k /sys/compile/KERNELCONFIG/kernel.debug /var/crash/vmcore.0
(gdb) where