FreeBSD for Linux Users
Gary Thornock
Provo Linux User Group
Overview
- What is FreeBSD?
- Base and Ports
- Filesystem Hierarchy
- System Startup
- Hardware Support
- Kernel Building
- Release, Stable and Current
- Resources
- Q & A
What is FreeBSD?
- Derived from 4.4BSD-Lite
- 4.4BSD-Lite is a derivative of BSD Unix which is certified as unencumbered since the Novell/Berkeley settlement.
- Not officially "UNIX"
- "UNIX" is a trademark of The Open Group.
- None of the BSDs have licensed the trademark.
- Neither has Linux.
- Unlike Linux, however, the BSDs are direct descendents of original Unix.
- Closely related to NetBSD and OpenBSD
- "BSD is what you get when a bunch of Unix hackers sit down to try to port a Unix system to the PC. Linux is what you get when a bunch of PC hackers sit down and try to write a Unix system for the PC."
Base and Ports
- Base system: the kernel and the userland, all developed together.
- Includes a shell (csh), an editor (vi), cvs, compilers, etc.
- Sufficient in itself to provide a running system.
- Ports: Third-party applications.
- Over 12,000 ports as of this writing.
- Well-known ports include X.org, KDE, Gnome, XFCE, Apache, PHP, Samba, vim, bash (ick), ...
- Most (but not all) applications you'd run on Linux also exist as FreeBSD ports.
- The Linux way: everything except the kernel is a port.
- It's up to the distribution maintainer to assemble a kernel and a collection of third-party applications and hope they all work together.
- cvsup and portupgrade
Filesystem Hierarchy
- User directories default to /usr/home
- Ports (generally) use the /usr/local hierarchy
- Documented: man hier
System Startup
- BSD doesn't use SysV Init
- No runlevels
- No /etc/rcn.d/ full of symlinks
- Service startup scripts are in /etc/rc.d and /usr/local/etc/rc.d
- Services are enabled in /etc/rc.conf
- XDM (or KDM or whatever) can be enabled in /etc/ttys
Hardware Support
- The myth of hardware support
- A common question: "Is my video card supported in FreeBSD?"
- The answer: if X.org supports it, then X.org supports it, regardless of whether you're in FreeBSD or Linux.
- Yes, nVidia cards do work.
- Most other hardware (sound cards, network cards, wifi, USB, firewire, etc) works fine too.
- WPA doesn't work yet, but it's not really there in Linux, either (as of August).
- Update: WPA support is in FreeBSD 6. A FreeBSD 6 release candidate build appeared on the download mirrors yesterday.
Kernel building
- The Handbook on building the kernel
- Simple text config file
- No need for "make xconfig" or "make menuconfig"
- make buildkernel KERNCONF=myconfig
- make installkernel KERNCONF=myconfig
- If you're just building a new config of your existing kernel version, that's it!
- If you're building a new kernel version then you also need to build the rest of the base system. See the handbook!!!
Release, Stable and Current
- Three different branches of the base system
- -RELEASE is the one to use in most cases.
- -STABLE is a testing branch. It's likely to work, but no guarantees.
- Not recommended for your main machine.
- Use at your own risk.
- -CURRENT is the development branch. It's likely to break.
- DON'T use -CURRENT on your main system!
- -CURRENT is NOT intended to give you the latest feature before everyone else gets it.
Resources
- URLS for the above listed online resources:
- The FreeBSD.org Web Site: http://www.freebsd.org/
- The FreeBSD Handbook: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/index.html
- FreeBSD.org Resources for Newbies: http://www.freebsd.org/projects/newbies.html
- Matthew Fuller's page: http://www.over-yonder.net/~fullermd/rants/bsd4linux/bsd4linux1.php
- FreeBSD at OnLamp.com: http://www.onlamp.com/topics/bsd/FreeBSD
- Dru Lavigne's FreeBSD for Linux Users article: http://www.onlamp.com/pub/a/bsd/2004/11/11/FreeBSD_Basics.html
- Dru Lavigne's portupgrade article: http://www.onlamp.com/pub/a/bsd/2003/08/28/FreeBSD_Basics.html
- The Greater Utah BSD User Group: http://www.gubug.org/