It's FreeBSD is, Unix Like operating system.
A FreeBSD inheritance from BSD ( Berkeley Software Distribution ) series is a canonical Unix branch, but FreeBSD cannot be called Unix because of legal reasons.

Compared to Linux, FreeBSD is closer to the traditional Unix design style.

Differences with linux

Authorization protocol differences:

  • A Linux uses GPLv2 lICE es that are poor lICE e compatibility, and the kernel development needs to continue to open source code, directly resulting in open source technologies that use other lICE es that can't incorporate the Linux kernel, such as ZFS file systems.
  • FreeBSD uses BSD licenses,, and multiple companies based on FreeBSD for commercial development, such as Apple macOS, Sony Play Station 3/4, etc.

Development mode differences:

  • A Linux project contains only kernel development, and the upstream tool chain is maintained by a different team, and there are a number of Linux cores that
  • A FreeBSD project is a complete operating system containing kernel, device drivers, tool chains, documents, etc. As Linux, the development team is smaller and.

Community scale differences:

  • It's good for Linux business promotion, high social switch, large development team, for new hardware, new technology has better support.
  • The FreeBSD development team is smaller and slower, and it's slow to support new hardware

Install and configure

A FreeBSD official FTP site provides a mirror download that addresses
In the ISO-IMAGES directory, the mirror of the official release, select the matching CPU schema and version.

The mirror naming rule is as follows:


The mirror type is divided into the following categories:

  • A bootonly extension is iso for boot only
  • A disc1 extension is iso, basic image, containing basic packages
  • A dvd1 extension is iso containing a large number of common packages
  • memstick img, burn using images, including basic packages
  • memstick-mini extension img, burn using mirror, with core packages, minimize installation use

Extended iso image is used for virtual machine startup, image is used for I tallation.
Burn the image using the dd I & truction and add some arguments to the memstick-mini image of the amd64 schema as an example, the burn I & truction follows:

# dd if='FreeBSD-[版本]-RELEASE-amd64-memstick-mini.img' of='/dev/[磁盘id]' bs=1M conv=sync

Booting a freebsd in the

A FreeBSD 10 began to introduce UEFI startup support, and FreeBSD 10 runs in UEFI mode to download a separate version of the UEFI with the name.
As an example of FreeBSD 10.3, the corresponding amd64 burn mirror name FreeBSD-10.3-RELEASE-amd64-uefi-memstick.img .
From FreeBSD 11, mirroring supports UEFI startup and no longer distinguish whether with UEFI.

A FreeBSD installed in the boot UEFI mode needs to download the image of the iso format and extract the /boot/boot1.efi file.
Create a FreeBSD directory in the ESP partition and copy the boot1.efi file to it.
Manually select the boot1.efi file in UEFI BIOS as a system boot entry, restart the FreeBSD system that's installed in UEFI mode.

Use the grub 2. 0 to boot the freebsd.

Create a startup entry for FreeBSD in the grub.conf file, specifying the location of the FreeBSD boot file boot1.efi, as follows:

menuentry 'FreeBSD' {

 insmod part_gpt

 insmod fat

 set root='hd0,gpt1'

 chainloader/EFI/FreeBSD/boot1.efi # FreeBSD efi文件的实际路径


Using boot1.efi files to boot FreeBSD directly through GRUB2 starts the bsd kernel is simpler and requires no complex boot configuration.

Wireless network configuration

Configuring wireless networks in the environment recommended use of wpa_supplicant tools.
A wpa_supplicant tool provided by the FreeBSD source defaults to the default without generating configuration files, and you need to create wpa_supplicant.conf under the /etc path.
A wpa_supplicant.conf configuration template looks like this:





Default wireless network adapter name ath0. Write the wireless configuration to the /etc/rc.conf:


ifconfig_wlan="WPA DHCP"

Start the network service after:

# service netif start

Connect to an unencrypted wireless network, and don't need to use wpa_supplicant.conf, add directly to /etc/rc.conf:


ifconfig_wlan0="ssid [无线网ssid] DHCP"

Service management

It uses the traditional style init system, the service item in the /etc/rc.d.
You can use the service command to manage services:

# service [服务名称] [start | stop | status]

services, and some system configurations are stored in /etc/rc.conf files.
For example, the ssh service needs to be powered on to add sshd_enable="YES" to the rc.conf file.

Common service configuratio &:

hostname="MacBook" //主机名称

ifconfig_em0="DHCP" //网络DHCP

ifconfig_em0_ipv6="inet6 accept_rtadv" //ipv6

sshd_enable="YES" //ssh服务

ntpd_enable="YES" //时间同步服务

powerd_enable="YES" //电源管理服务

dumpdev="AUTO" //内核错误转储服务

Package management

At the same time, FreeBSD provides Ports system based on source compiled package and pkg package management based on.


After FreeBSD 10 introduced a new pkg tool for managing software packages, common instructions similar to yum/apt/dnf:

# pkg install [软件包名称]

# pkg search [软件包名称]

# pkg remove [软件包名称]

# pkg autoremove [软件包名称]

# pkg info//查询所有已安装的软件包

# pkg info [软件包名称]//查询某个软件包的具体信息(包括软件包的文件组成,依赖关系,来源等)


The Ports system provides the tree of all packages in the official source, which can customize the compilation parameters before compiling the installation.
A Ports source tree is located in the /usr/ports directory and needs to initialize the Ports tree before the first use:

# portsnap fetch extract

After updating the Ports tree execution:

# portsnap update

Compile the source code for a package in the Ports tree to go into the corresponding source directory, and perform the following steps:

  • make config enters the interactive interface and configures the build dependency
  • make performs compilation operatio &
  • Execute install operation after make install compilation complete
  • Clean temporary files after make clean I tallation

It's also managed by the pkg package manager after installation with source code.

System upgrade

FreeBSD isn't a release, the system has a strict version partition.
Upgrade tool freebsd-update using FreeBSD upgrade system version.
Upgrade to the specified ve & ion, execute I & tructio &:

# freebsd-update -r [版本号-发布状态] upgrade

Execute the directive with FreeBSD 10.1.

# freebsd-update -r 10.1-RELEASE upgrade

After the system will start downloading the patches needed to upgrade, execute the update instruction after the download is complete:

#/usr/sbin/freebsd-update install

Copyright © 2011 Dowemo All rights reserved.    Creative Commons   AboutUs