Sei sulla pagina 1di 25

The FreeBSD

Compact Reference
Guide

Sponsored By

Broadcasting World
www.broadcastingworld.net

Written By
David Childers
The FreeBSD Documentation License

Redistribution and use in source (SGML DocBook) and 'compiled' forms (SGML, HTML, PDF, PostScript, RTF
and so forth) with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code (SGML DocBook) must retain the above copyright notice, this list of
conditions and the following disclaimer as the first lines of this file unmodified.

2. Redistributions in compiled form (transformed to other DTDs, converted to PDF, PostScript, RTF and other
formats) must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

Important: THIS DOCUMENTATION IS PROVIDED BY THE FREEBSD DOCUMENTATION PROJECT "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
FREEBSD DOCUMENTATION PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
www.freebsd.org/copyright/freebsd-doc-license.html

Creative Common License

This body of work is released under the Attribution-ShareAlike version 3.0, Creative Common License.

The work may be freely distributed or modified for commercial or non commercial purposes.

If this work is modified, compliance with the Attribution-ShareAlike version 3.0, Creative Common License is
required.

These requirements include:

- Any derivatives of this work must be attributed to David Childers.


- Alterations, transforming, or building upon this work requires distributing the resulting work only under the
same, similar or a compatible license.

For the complete legal code, please refer here:


www.creativecommons.org/licenses/by-sa/3.0/legalcode

Cover graphic - This picture was taken from the Dictionnaire encyclopédique Trousset, also known as the
Trousset encyclopedia, Paris, 1886 - 1891.
www.oldbookillustrations.com/pages/vignette1.php?lng=en
About The Author

David Childers is the Content Manager and Senior Editor for the International Broadcasting portal
www.BroadcastingWorld.net. He is also the webmaster of the SHOUTcast video streaming information
resource, www.scvi.net. He is very active in the Internet broadcast industry.

Mr. Childers' work has been cited in several national and International publications, such as:

Five Essays on Copyright In the Digital Era


Turrer Publishing

Research On High-Profile Digital Video Production


Digital Content Association of Japan

Video Podcasting in Perspective: The History, Technology, Aesthetics and Instructional Uses of a New Medium
Journal of Educational Technology Systems

Video Podcasting: When, Where and How it's Currently used for Instruction
The National Convention of the Association for Educational Communications and Technology

IP Packet Charging Model For Multimedia Services


National University of Rwanda

Preservation of audiovisual mediums : Problems and challenges.


Platform for Archiving and Preservation of Art on Electronic and Digital Media.

P2P Technology Trend and Application to Home Network


Electronics and Telecommunications Research Institute Journal

Peer To Peer Computing - The Evolution of a Disruptive Technology


Idea Group Publishing

Peer-to-Peer Systems and Applications


Lecture Notes In Computer Science
Springer Berlin / Heidelberg

Mr. Childers has also written several guides including:

Easy Gnome Desktop Installation Script For FreeBSD


www.scribd.com/doc/27366469/Gnome-Desktop-Installation-Script-For-FreeBSD

SHOUTcast Streaming Best Of Technical Support


www.scribd.com/doc/24188933/SHOUTcast-Streaming-Best-of-Technical-Support

SHOUTcast Audio And Video Streaming Guide


www.scribd.com/doc/19781412/SHOUTcast-Audio-And-Video-Streaming-Guide

Icecast Streaming Handbook


www.scribd.com/doc/18175026/Icecast-Streaming-Handbook

Streaming Media Handbook


www.scribd.com/doc/16272608/Streaming-Media-Handbook
Foreword

There are numerous publications available for the FreeBSD enthusiast, and you can fill a library with Unix
reference publications as well. However, there are no readily available compact reference guides for the
typical FreeBSD user. I want to continue my contribution to the FreeBSD and Open Source movement and
provide such a guide.

I would like to thank Scarlet Coker for providing assistance with the editing of the manuscript and James
Davey at Broadcasting World for allowing me the opportunity to create this guide.

It is my sincere hope that the reader finds this reference guide beneficial.

Felicidade com você.

David Childers
www.scvi.net

April 2010

Controlling complexity is the essence of computer programming.

Brian Kernigan
Please Donate

If you find this guide useful, please consider making a small donation to show your appreciation for my work.
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=10870717
Index

- Directory Structure

- System Configuration Files

- Memory Devices And File Systems

- System Information Commands

- Common Commands

- Additional Information
Directory Structure

Directory Description

/ Root directory of the file system.

/bin/ User utilities fundamental to both single-user and multi-user environments.

/boot/ Programs and configuration files used during operating system bootstrap.

/boot/defaults/ Default bootstrapping configuration files.

/dev/ Device nodes.

/etc/ System configuration files and scripts.

/etc/defaults/ Default system configuration files.

/etc/mail/ Configuration files for mail transport agents.

/etc/namedb/ Named configuration files.

/etc/periodic/ Scripts that are run daily, weekly, and monthly, via cron.

/etc/ppp/ ppp configuration files.

/mnt/ Empty directory commonly used by system administrators as a temporary mount point.

/proc/ Process file system.

/rescue/ Statically linked programs for emergency recovery.

/root/ Home directory for the root account.

/sbin/ System programs and administration utilities fundamental to both single-user and multi-
user environments.

/tmp/ Temporary files. The contents of /tmp are usually NOT preserved across a system reboot. A
memory-based file system is often mounted at /tmp. This can be automated using the
tmpmfs-related variables of rc.conf (or with an entry in /etc/fstab).

/usr/ The majority of user utilities and applications.

/usr/bin/ Common utilities, programming tools, and applications.

/usr/include/ Standard C include files.

/usr/lib/ Archive libraries.

/usr/libdata/ Miscellaneous utility data files.

/usr/libexec/ System daemons & system utilities (executed by other programs).

/usr/local/ Local executables, libraries, etc. Also used as the default destination for the FreeBSD ports
framework. Within /usr/local, the general layout sketched out by hier for /usr should be
used. Exceptions are the man directory, which is directly under /usr/local rather than
under /usr/local/share, and the ports documentation is in share/doc/port.

/usr/obj/ Architecture-specific target tree produced by building the /usr/src tree.

/usr/ports/ The FreeBSD Ports Collection (optional).

/usr/sbin/ System daemons & system utilities (executed by users).


/usr/share/ Architecture-independent files.

/usr/src/ BSD and/or local source files.

/usr/X11R6/ X11R6 distribution executables, libraries, etc (optional).

/var/ Multi-purpose log, temporary, transient, and spool files. A memory-based file system is
sometimes mounted at /var. This can be automated using the varmfs-related variables of
rc.conf (or with an entry in /etc/fstab).

/var/log/ Miscellaneous system log files.

/var/mail/ User mailbox files.

/var/spool/ Miscellaneous printer and mail system spooling directories.

/var/tmp/ Temporary files. The files are usually preserved across a system reboot, unless /var is a
memory-based file system.

/var/yp/ NIS maps.

This information used by permission via the FreeBSD Documentation License.


Copyright 1994-2009 The FreeBSD Project. All rights reserved.
System Configuration Files

List of the most common system configuration files

/boot/loader.conf

This file contains information for bootstrapping the system.

The following attributes can specified:


* The kernel to be booted.
* Parameters to be passed to the kernel.
* Additional modules to be loaded by the kernel.
* Generally sets all variables described in loader.

/etc/fstab

This file contains descriptive information about the various file systems.

/etc/ftpusers

This file contains a list of users that may not log in using the File Transfer Protocol (FTP) server daemon.

/etc/group

This file defines the groups on the system.

The following attributes can be specified:


* group_name - The name of the group.
* password - The (encrypted) group password.
* GID - The numerical group ID.
* user_list - A list of the member usernames of this group.

/etc/hosts

This file contains information that associates IP addresses with hostnames.

/etc/hosts.allow

This file contains the names of the hosts which are allowed to use local resources.

/etc/hosts.equiv

This file contains the names of trusted remote hosts and users.

/etc/hosts.lpd

This file contains a list of hostnames or IP addresses that are allowed to use local print services.

/etc/inetd.conf

This is the default configuration file for the inetd (super-server) daemon.

/etc/login.access

This file specifies (user, host) combinations and/or (user, tty) combinations for which a login will either be
accepted or refused.

/etc/login.conf

This file contains various attributes and capabilities of login classes. A login class (A optional annotation
against each record in the user account database, /etc/master.passwd.) determines session accounting,
resource limits and user environment settings which are specified.
/etc/make.conf

This file contains system-wide settings that will apply to every build using make and the standard sys.mk file.

/etc/newsyslog.conf

This file is used to set log file rotation configuration for the newsyslog utility.

/etc/rc.conf

This file contains descriptive information about the local host name and configuration details for any potential
network interfaces. It also specifies which services should be started at the system initial boot time.

/etc/ssh/sshd_config

This file contains configuration information for the OpenSSH SSH daemon.

/etc/sysctl.conf

This file contains values to be read in and set by sysctl.

/etc/syslog.conf

This file contains configuration information for the syslogd program.

/etc/ttys

This file contains information that is used by various routines to initialize and control the use of terminal
special files.
Memory Devices And File Systems

Disk Device Codes

Code Device

ad ATAPI (IDE) disk

da SCSI direct access disk

acd ATAPI (IDE) CDROM

cd SCSI CDROM

fd Floppy disk

External Mounted Device

To enable device auto mount, the HAL daemon must be initialized when the computer is started.

HAL provides a hardware abstraction layer. Its purpose is to allow desktop applications to discover and use
the hardware of the host system, regardless of the type of hardware.

Steps to initialize this process:

Edit the /etc/rc.conf file:


# nano /etc/rc.conf

The following line needs to be added to the /etc/rc.conf file:


hald_enable="YES"

This command can be used to verify that the attached device is present.
# dmesg

Unix File Systems

The Unix file system (UFS) is a file system used by many Unix and Unix-like operating systems. Some of the
things that make UFS unique include:
* A few blocks at the beginning of the partition reserved for boot blocks, which must be initialized separately
from the file system.
* A superblock, containing information identifying this as a UFS file system, and additional data describing the
file system's geometry, statistics, and behavioral tuning parameters.
* A collection of cylinder groups.

UFS2 is an extension to the well-known UFS. It adds 64 bit block pointers (breaking the 1T barrier), support
for extended file storage, in addition to other features.

ZFS is a combined file system and logical volume manager designed by Sun Microsystems. Some features of
ZFS include:
* Support for high storage capacities.
* Integration of the concepts of file system and volume management.
* Snapshots and copy-on-write clones.
* Continuous integrity checking and automatic repair.
* RAID-Z and native NFSv4 ACLs.

The ext2 or second extended file system is a file system for the Linux kernel.

The ext3 or third extended file system is a journaled file system that is commonly used by the Linux kernel.
System Information Commands

Hardware Configuration

List kernel configuration parameters at runtime.


# sysctl -a
The -a option displays all values currently available.

Detect and display the installed hardware.


(This file is usually a snapshot of the buffer contents taken after file systems are mounted at startup time. It
is not modified till system is rebooted.)
# cat /var/run/dmesg.boot

Diagnostic utility for the PCI bus.


# pciconf -l
The -l option lists all devices found by the boot probe.

Configure the kernel-resident network interfaces.


# ifconfig -a
The -a option displays all interfaces which are currently available.

Add Device Without Reboot

CAM subsystems.
This utility provides the user with access and control of the FreeBSD CAM subsystem. Improper use of this
utility can cause a loss of data and/or system crashes.
# camcontrol

ata subsystems.
This utility provides the user with access and control of the FreeBSD ata subsystem. (ATA device driver
control program.)
# atacontrol

Kernel modules.
This utility loads file.ko files into the kernel using the kernel linker.
# kldload [Name of kernel module to be loaded.]

Summary Of Commands To Obtain Hardware Information

Determine the hardware type/platform.


# uname -m

Determine the machine processor architecture.


# uname -p

Determine FreeBSD release level.


# uname -r

Obtain all the information at one a time.


# uname -mrs

Example output:
FreeBSD 8.0-RELEASE i386

Determine CPU information, such as speed, make etc.


# dmesg | grep CPU

Example output:
CPU: Pentium 4 (1716.41-MHz 686-class CPU)
acpi_cpu0: on acpi0
acpi_cpu: CPU throttling enabled, 8 steps from 100% to 12.5%
Determine the real and available memory in FreeBSD.
# dmesg | grep memory

Example output:
real memory = 201326592 (192 MB)
avail memory = 188555264 (179 MB)

Determine how long a computer has been running.


# uptime

Determine when a computer was last rebooted or shutdown.


# last -1 reboot
# last -1 shutdown

Determine swap file system usage.


# swapinfo -k

Determine when a specific user was last logged in.


# last [user-name]
user-name is the login of the user you are inquiring about.
Common Commands

System Related Commands

List who is logged into the system.


#w

List who is logged into the system and where they are logging in from.
# who

List your current processes within the system.


# ps -u [user-name]
user-name is the login name of the user.

Kill (ends) process with a specified ID.


This command works only for your own processes.
# kill PID [process number]

List commands that have recently been executed.


# history

Exit from the login shell and terminate session.


# logout

Exit from any shell.


# exit

Find the location of a program.


# whereis [program name]

List current jobs running on the computer and their status.


# jobs

Login Commands

Add a user or group to the computer.


# adduser [name]

Remove a user from the computer.


# rmuser [name]

Change your current password.


# passwd

Add users to wheel group (For SU).


# pw user mod user name -G wheel
# groups user-name
user-name is the login name of the user you want to add.

Gaining access to FreeBSD file system using single user mode .


- Boot system
- Start single-user mode
- Execute the following commands to access the file system.
# fsck -p
# mount -u /
# mount -a -t ufs

Disk Commands

Display current disk free space.


# df
Display disk usage.
# du

Display how much disk space has been used.


# quota

Printer Commands

Remove a print job from a print queue.


# lprm

Check the status of a print queue.


# lpq

General Commands

Look up a word in an electronic version of Webster's dictionary and display the definition(s) .
# webster [word]

Show the current date and time.


# date

Show a calendar of the current month.


# cal
Use e.g., 'cal 10 2009' to get that for October 09, or 'cal 2009' to get the whole year.

Show the MANual page for a program.


# man [command name]

Display the contents of the filename that is specified.


This command displays the file, one screen at a time.
# cat [filename]
Example: # cat ~/var/log/messages

Create a copy of source-file with the name target-file.


You can specify pathnames as part of the file specification. If target-file exists it is overwritten.
# cp [source-file] [target-file]
Example: # cp index.html ~/www/htdocs/index.html

Find lines in files that match specified text patterns.


You can specify pathnames as part of the file specification.
# grep [pattern] [filenames]
Example: # grep href *.html

Directory Commands

Change your current working directory to the directory you specify.


# cd [directory]
Example: # cd ~/www/htdocs

Display your current (or present) working directory.


# pwd

List the files in the directory specified, or the current directory you are in.
You can also add additional arguments to customize the list display.
# ls [directory] [option]
Options:
The -f option will append a forward slash to the subdirectory names so you can easily distinguish them from
file names.

The -a option will show all hidden files. Hidden files begin with a dot (.), such as .htaccess files.
The -l option will show detailed information about each file and directory, including permissions, ownership,
file size, and when the file was last modified.

Create a new directory with the name, that you specify.


# mkdir [directory_name]
Remove a specific directory.
# rmdir [directory_name]

File Commands

Determine file type.


# file [name of file]

Find files anywhere on the computer.


# ff -p
The -p option allows you to use just the beginning of the file name

Change the read, write, and execute permissions on files.


# chmod [options] file_name

Basic chmod options are:


(Class Operation Mode, no spaces inbetween)

Class
u The user who owns the file.
g The group the file belongs to.
o The other users.
a All of the above.

Operation
+ Adds the mode to the specified class.
- Removes the specified mode from the specified class.
= The modes specified are to be made the exact modes for the specified class.

Mode
r Permission to read the file.
w Permission to write or delete the file.
X Permission to execute the file.

Move file to a new location.


The pathname can be specified as part of the command specification. If the target-file exists, it is overwritten.
# mv [source-file] [target-file]
Example: # mv ~/www/htdocs/index.html ~/www/vhosts/mydomain/index.html

Rename file.
# mv old_file_name new_file_name

Delete (removes) a file.


To remove a directory and everything inside, you can use the -r (recursive) flag (e.g. rm -r filename). The
pathname can be specified as part of the file command.
# rm [filename]
Example: # rm ~/www/htdocs/old-index.html

Compression Commands

Copy a file or files to or from an archive.


- To put all the files located in a directory into one tarfile format file, use # tar -cvf example directory at a
command prompt. Replace example with the name you want to call the archived file, and replace directory
with the name of the directory that contains the files you want to compress.
- To extract the compressed files from a tar format archive, use # tar -xvf example and replace example with
the name of the archived file you are extracting.
- To view the contents of a tar format archive file without extracting it, use # tar -tvf tarfile name. This will
display all files that are included in the tar format archive. You could also use # tar -xvf tarfile name to
extract the compressed contents into the current directory.
# tar [options] [tarfile] [files]

Compress a file or list of files into a zip format archive file.


Use the command # zip zipfile file1 file2 file3 and replace zipfile with the name you want to use for your
compressed zip archive file, and replace file# with the name of the file(s) you want to compress into the zip
archive.
# zip [options] [zipfile] [files]

Extract a zip format archive file.


Use the command # unzip zipfile and replace zipfile with the name of the zip format archive file.
# unzip [options] [zipfile]

Installing Packages

Remote FTP installation


pkg_add -r package_name

Local installation
pkg_add package_name

You must navigate to the location where the package is residing and execute the pkg_add command with the
exact file name to install the package.

Example:
# cd /home/user/Desktop/
# pkg_add wow_1234.tbz

Installing Ports

Obtain and update port collection


# portsnap fetch
# portsnap extract
# portsnap update

Locate the port you wish to install


(You can locate specific ports on your system using www.freshports.org)

Example

Navigate to the port location:


# cd /usr/ports/www/firefox/ && make install clean

Install:
# make install clean

System Packages And Ports Information

Display a list of all currently installed packages.


# pkg_info -a

Display one line comment field for each installed package.


# pkg_info -c

Display the long description field for each installed package.


# pkg_info -d

Display a list of all currently installed packages that have a specified word in the package name.
# pkg_info | grep -i package_name
Removes packages and ports.
# pkg_delete package_name

Enable mount CD / DVD


(Ver 8.0 and above)

# mkdir /media/cdrom

# chmod 660 /dev/acdo

# mount -t cd9660 /dev/acd0 /media/cdrom


Additional Information

Shutting Down The Computer

There are two methods for turning off a computer system.

The computer hardware DOES support ACPI - Advanced Configuration and Power Interface.
(ACPI hardware compatability can be determined by checking the computer BIOS configuraiton.)
# shutdown -p now

The computer hardware DOES NOT support ACPI.


# shutdown -h now
Manualy turn off the power switch off.

Adding Hardware

Post Installation Network Interface Card Configuration

Additional network interface cards can be configured after the FreeBSD installation.

- Initiate sysinstall:
# sysinstall

This information screen will open: FreeBSD - sysintall Main Menu

- Select this option:


Configure Do post-install configuration of FreeBSD

This information screen will open: FreeBSD Configuration Menu

- Select this option:


Networking Configure additional network services

This information screen will open: Network Services Menu

- Select this option:


Interfaces Configure additional network interfaces

This information screen will open: Network interface information required

- Select this option:


The network interface card that you desire to configure.

- Select the appropriate nework interface card.

* If the install network interface card is not listed, you will need to manually configure the device.
www.freebsd.org/doc/en/books/handbook/config-network-setup.html

Sound Card Installation

Load all sound card device drivers for audio hardware with the sound driver module:
# kldload snd_driver

Display which sound card device driver was selected and initialized:
# cat /dev/sndstat

Edit the /boot/loader.conf file:


# nano /boot/loader.conf

The following line needs to be added to the /boot/loader.conf file:


snd_xxx_load="YES"
xxx is the audio hardware identified by # cat /dev/sndstat command.
Wireless Card Installation

Edit the /boot/loader.conf file:


# nano /boot/loader.conf

The following line needs to be added to the /boot/loader.conf file:


if_nic-card_load="YES"
nic-card is the wireless hardware being installed.

Wifi Security

WEP

These modules must be loaded at boot time.

Edit the /boot/loader.conf file:


# nano /etc/rc.conf:

Add these lines to the /boot/loader.conf file:


wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

(IT IS HIGHLY ADVISABLE NOT NOT TO UTILIZE WEP, DUE TO SECURITY ISSUES.)

WPA

Edit the /etc/wpa_supplicant.conf file:


# nano /etc/wpa_supplicant.conf

Add these lines to the /etc/wpa_supplicant.conf file:


network={
ssid="freebsdap"
psk="freebsdmall"
}

Edit the /etc/rc.conf file:


# nano /etc/rc.conf

Add these lines to the /etc/rc.conf file:

Edit the /etc/rc.conf file:


# nano /etc/rc.conf

wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"

Start the interface:


# /etc/rc.d/netif start

Start the dhclient command to acquire the IP address from the DHCP server:
# dhclient wlan0

* Important * Manually executing the dhclient is not necessary, if the /etc/rc.conf was properly configured
with ( ifconfig_wlan0="DHCP”)

Common UNIX Printing System - CUPS Installation

Install the cups package.


# pkg_add -r cups
Edit the /etc/devfs.rules file:
# nano /etc/devfs.rules

The following lines need to be added to the /etc/devfs.rules file:


[system=10]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups

Edit the /etc/rc.conf file:


# nano /etc/rc.conf

The following lines need to be added to the /etc/rc.conf file:


cupsd_enable="YES"
devfs_system_ruleset="system"
Edit the following files:
/usr/local/etc/cups/mime.types
/usr/local/etc/cups/mime.convs

# nano /usr/local/etc/cups/mime.types
# nano /usr/local/etc/cups/mime.convs

Uncomment the following line in each of those files:


application/octet-stream

Adding Additional Printer Devices To Cups

If cups does not natively support your printer, you can attempt to install additional printer drivers. You can
find additional printer driver information located here: www.cups.org/ppd.php.
The printer device ppd file needs to be placed in the CUPS "model" directory. This directory stores all PPD
files. This directory is located at: /usr/local/share/cups/model.

Binary Operating System Compatibility

Linux Resources

Linux emulation allows the installation and execution of Linux compiled software on the FreeBSD operating
system.

This must be done while logged in as root.

To enable Linux emulation, perform the following:


(# indicates a typed command.)

Load the Linux kernel module.


# kldload linux

The base set of packages needed in Linux mode for i386/amd64 (Linux Fedora 10) must be installed.
# cd /usr/ports/emulators/linux_base-f10/
# make install clean

Edit the /etc/rc.conf file:


# nano /etc/rc.conf

This line needs to be added to the file:


linux_enable="YES”

Create shadow root for Linux compatibility.


#cd /
#mkdir /compat/linux
To help the FreeBSD kernel distinguish between a FreeBSD elf binary from a Linux binary, use the brandelf
utility.
# brandelf -t Linux my-linux-elf-binary

Wine Resources

Wine
This software allows you to run Windows software on other operating systems.
www.winehq.org

Install the wine package.


cd /usr/ports/emulators/wine/ && make install clean

Q4Wine
This is a QTt4 GUI for Wine. It will assist in managing wine prefixes and installed applications.
q4wine.brezblock.org.ua

Install the Q4 wine pacakge .


# cd /usr/ports/deskutils/q4wine/ && make install clean

Winetricks
This is a quick and dirty script to download and install various redistributable runtime libraries sometimes
needed to run programs in Wine.
wiki.winehq.org/winetricks

# wget http://www.kegel.com/wine/winetricks
# mv winetricks winetricks.sh
# chmod 755 winetricks.sh
# ./winetricks.sh

Miscellaneous

Shells

This software provides an interface for users to access the services of a kernel.

www.freebsd.org/ports/shells.html

www.freebsd.org/doc/en/books/handbook/shells.html

Firewalls

IPFIREWALL is a FREEBSD sponsored IP packet filter and traffic accounting application.

This module must be loaded at boot time.

Edit the /etc/rc.conf file:


# nano /etc/rc.conf

Add this line to the /etc/rc.conf file:


firewall_enable="YES"

After these changes are made, reboot your system.

The following highlighted message is displayed on the screen as part of the boot process:
ipfw2 initialized, divert disabled, rule-based forwarding disabled, default to deny, logging disabled

The IPFW sample ruleset can be found in the following files /etc/rc.firewall and /etc/rc.firewall

IPFILTER provides a kernel resident firewall and NAT application.


This module must be loaded at boot time.

Edit the /etc/rc.conf file:


# nano /etc/rc.conf

Add this line to the /etc/rc.conf file:


ipfilter_enable="YES"

OpenBSD Packet Filter (PF) is similar to IPFilter, with some modifications to make it clearer.

This module must be loaded at boot time.

Edit the /etc/rc.conf file:


# nano /etc/rc.conf

Add this line to the /etc/rc.conf file:


pf_enable="YES"

Execute the startup script to load the PF module:


# /etc/rc.d/pf start

The default location of the ruleset configuration file is /etc/pf.conf.

Software

Virus

clamav
Command line virus scanner written entirely in C.
# pkg_add -r clamav

Configuring clamav.

Edit the /etc/rc.conf file:


# nano /etc/rc.conf

Insert these lines to the /etc/rc.conf file:


clamav_freshclam_enable=”YES”
clamav_clamd_enable=”YES”

Starting Clamav Daemon:


# /usr/local/etc/rc.d/clamav-clamd start

Update virus database:


# freshclam

Jail Resources

The FreeBSD jail mechanism is an implementation of operating system-level virtualization that allows
administrators to partition a FreeBSD-based computer system into several independent mini-systems called
jails. This is used to protect the computer system from being compromised by running specific software
applications.

The FreeBSD Handbook section on jails.


www.freebsd.org/doc/handbook/jails.html

Quick guide to ezjail.


www.scottro.net/qnd/qnd-ezjail.html

ezjail
A framework to easily create, manipulate and run FreeBSD jails.
# pkg_add -r ezjail

jailadmin
A system for managing a set of named jails.
# pkg_add -r jailadmin

Java Runtime Environment

Ensure that the FreeBSD ports collection has been installed and that is is current.

# cd /usr/ports/java/diablo-jre16/
# make clean

Webcam support

Webcamd is a daemon that enables use of hundreds of different USB based webcam and DVB USB devices
under the FreeBSD-8/9 operating system.

Installation:

You must also install kernel source tree.


www.cyberciti.biz/faq/freebsd-install-kernel-source-code/

# cd /usr/ports/multimedia/webcamd/
# make install clean

Edit the /etc/rc.conf file:


# nano /etc/rc.conf

Add this line to the /etc/rc.conf file:


webcamd_enable="YES"

Edit the /boot/loader.conf file:


# nano /boot/loader.conf

Add this line to the /boot/loader.conf file:


cuse4bsd_load="YES"

Suggested System Software

GNU Parted
This is an industrial-strength package for manipulating partition tables.
www.gnu.org/software/parted/download.shtml

Wifimgr
A GUI-based tool to manage WiFi network configuration.
opal.com/freebsd/ports/net-mgmt/wifimgr

Written

References

FreshPorts has everything you want to know about FreeBSD software, ports, packages and applications.
www.freshports.org

The FreeBSD Handbook.


www.freebsd.org/doc/en/books/handbook

The complete FreeBSD (Book).


www.lemis.com/grog/Documentation/CFBSD
Comprehensive Guide to FreeBSD.
www.vmunix.com/fbsd-book

FreeBSD Hints & Kinks.


myfreebsd.homeunix.net/hints_n_kinks

FreeBSD Security Advisories.


security.freebsd.org/advisories

Potrebbero piacerti anche