PC-BSD is based on {{citelink|url=http://en.wikipedia.org/wiki/BSD_UNIX|BSD Unix}}, meaning that it is not a Linux distribution. If you have used Linux before, you will find that some features that you are used to have different names on a BSD system and that some commands are different. This section covers some of these differences.

+

−

=== Filesystems ===

+

PC-BSD® is based on {{citelink|wp|url=Berkeley_Software_Distribution|txt=BSD Unix}}, meaning that it is not a Linux distribution. If you have used Linux before, you will find that some features that you are used to have different names on a BSD system and that some commands are different. This section covers some of these differences.

−

BSD and Linux use different filesystems during installation. Many Linux distros use EXT2, EXT3, EXT4, or ReiserFS, while PC-BSD uses UFS or ZFS. This means that if you wish to dual-boot with Linux or access data on an external drive that has been formatted with another filesystem, you will want to do a bit of research first to see if the data will be accessible to both operating systems.

+

== Filesystems ==

−

Table 1.4a summarizes the various filesystems commonly used by desktop systems. Most of the desktop managers available from PC-BSD should automatically mount the following filesystems: FAT16, FAT32, EXT2, EXT3 (without journaling), EXT4 (read-only), NTFS5, NTFS6, and XFS. See [[Files and File Sharing]] for more information about available file manager utilities.

+

BSD and Linux use different filesystems during installation. Many Linux distros use EXT2, EXT3, EXT4, or ReiserFS, while PC-BSD® uses UFS or ZFS. This means that if you wish to dual-boot with Linux or access data on an external drive that has been formatted with another filesystem, you will want to do a bit of research first to see if the data will be accessible to both operating systems.

−

'''Table 1.4a: Filesystem Support on PC-BSD'''

+

Table 1.4a summarizes the various filesystems commonly used by desktop systems. Most of the desktop managers available from PC-BSD® should automatically mount the following filesystems: FAT16, FAT32, EXT2, EXT3 (without journaling), EXT4 (read-only), NTFS5, NTFS6, and XFS. See the section on [[Files and File Sharing]] for more information about available file manager utilities.

+

+

'''Table 1.4a: Filesystem Support on PC-BSD®'''

{{Tbl-init|width=100%}}

{{Tbl-init|width=100%}}

Line 23:

Line 24:

|-

|-

<!-- row 2 -->

<!-- row 2 -->

−

{{Tbl-line|align=left|'''EXT2'''}}

+

{{Tbl-line|align=left|'''exFAT'''}}

−

{{Tbl-line|Linux}}

+

{{Tbl-line|Windows}}

{{Tbl-line|align=left|content=r/w support loaded by default }}

{{Tbl-line|align=left|content=r/w support loaded by default }}

{{Tbl-line|}}

{{Tbl-line|}}

|-

|-

<!-- row 3 -->

<!-- row 3 -->

−

{{Tbl-line|bg=ff|align=left|'''EXT3'''}}

+

{{Tbl-line|bg=ff|align=left|'''EXT2'''}}

{{Tbl-line|bg=ff|Linux}}

{{Tbl-line|bg=ff|Linux}}

−

{{Tbl-line|bg=ff|align=left|r/w support loaded by default}}

+

{{Tbl-line|bg=ff|align=left|content=r/w support loaded by default }}

−

{{Tbl-line|bg=ff|align=left|since EXT3 journaling is not supported, you will not be able to mount a filesystem requiring a journal replay unless you '''fsck''' it using an external utility such as {{citelink|url=http://www.freshports.org/sysutils/e2fsprogs/|e2fsprogs}}.}}

+

{{Tbl-line|}}

|-

|-

<!-- row 4 -->

<!-- row 4 -->

−

{{Tbl-line|align=left|'''EXT4'''}}

+

{{Tbl-line|align=left|'''EXT3'''}}

{{Tbl-line|Linux}}

{{Tbl-line|Linux}}

−

{{Tbl-line|align=left|r/o support loaded by default}}

+

{{Tbl-line|balign=left|r/w support loaded by default}}

−

{{Tbl-line|align=left|EXT3 journaling, extended attributes, and inodes greater than 128-bytes are not supported; EXT3 filesystems converted to EXT4 may have better performance}}

+

{{Tbl-line|align=left|since EXT3 journaling is not supported, you will not be able to mount a filesystem requiring a journal replay unless you '''fsck''' it using an external utility such as {{citelink|url=http://e2fsprogs.sourceforge.net/|txt=e2fsprogs}}.}}

|-

|-

<!-- row 5 -->

<!-- row 5 -->

−

{{Tbl-line|bg=ff|align=left|'''FAT16'''}}

+

{{Tbl-line|bg=ff|align=left|'''EXT4'''}}

−

{{Tbl-line|bg=ff|Windows}}

+

{{Tbl-line|bg=ff|Linux}}

−

{{Tbl-line|bg=ff|align=left|content=r/w support loaded by default}}

+

{{Tbl-line|bg=ff|align=left|r/o support loaded by default}}

−

{{Tbl-line|bg=ff|align=left|}}

+

{{Tbl-line|bg=ff|align=left|EXT3 journaling, extended attributes, and inodes greater than 128-bytes are not supported; EXT3 filesystems converted to EXT4 may have better performance}}

{{Tbl-line|bg=ff|align=left|content=full r/w support loaded by default}}

+

{{Tbl-line|bg=ff|align=left|none}}

{{Tbl-line|bg=ff|align=left|}}

{{Tbl-line|bg=ff|align=left|}}

|-

|-

<!-- row 10 -->

<!-- row 10 -->

−

{{Tbl-line|align=left|'''NTFS6'''}}

+

{{Tbl-line|align=left|'''NTFS5'''}}

{{Tbl-line|Windows}}

{{Tbl-line|Windows}}

−

{{Tbl-line|align=left|r/w support loaded by default}}

+

{{Tbl-line|align=left|content=full r/w support loaded by default}}

{{Tbl-line|align=left|}}

{{Tbl-line|align=left|}}

|-

|-

<!-- row 11 -->

<!-- row 11 -->

−

{{Tbl-line|bg=ff|align=left|'''ReiserFS'''}}

+

{{Tbl-line|bg=ff|align=left|'''NTFS6'''}}

−

{{Tbl-line|bg=ff|Linux}}

+

{{Tbl-line|bg=ff|Windows}}

−

{{Tbl-line|bg=ff|align=left|content=r/o support is loaded by default}}

+

{{Tbl-line|bg=ff|align=left|r/w support loaded by default}}

{{Tbl-line|bg=ff|align=left|}}

{{Tbl-line|bg=ff|align=left|}}

|-

|-

<!-- row 12 -->

<!-- row 12 -->

−

{{Tbl-line|align=left|'''UFS'''}}

+

{{Tbl-line|align=left|'''ReiserFS'''}}

−

{{Tbl-line|PC-BSD}}

+

{{Tbl-line|Linux}}

−

{{Tbl-line|align=left|r/o support is included in Linux kernel 2.6.5 onwards;<br>r/w support on Mac;<br>{{citelink|url=http://www.ufsexplorer.com/download_stdr.php|UFS Explorer}} can be used on Windows}}

+

{{Tbl-line|align=left|content=r/o support is loaded by default}}

−

{{Tbl-line|align=left|changed to r/o support in Mac Lion}}

+

{{Tbl-line|align=left|}}

|-

|-

<!-- row 13 -->

<!-- row 13 -->

−

{{Tbl-line|bg=ff|align=left|'''UFS+S'''}}

+

{{Tbl-line|bg=ff|align=left|'''UFS'''}}

−

{{Tbl-line|bg=ff|PC-BSD}}

+

{{Tbl-line|bg=ff|PC-BSD®}}

−

{{Tbl-line|bg=ff|align=left|check if your Linux distro provides ufsutils;<br>r/w support on Mac;<br>{{citelink|url=http://www.ufsexplorer.com/download_stdr.php|UFS Explorer}} can be used on Windows}}

+

{{Tbl-line|bg=ff|align=left|r/o support is included in Linux kernel 2.6.5 onwards;<br>r/w support on Mac;<br>{{citelink|url=http://www.ufsexplorer.com/download_stdr.php|txt=UFS Explorer}} can be used on Windows}}

{{Tbl-line|bg=ff|align=left|changed to r/o support in Mac Lion}}

{{Tbl-line|bg=ff|align=left|changed to r/o support in Mac Lion}}

|-

|-

<!-- row 14 -->

<!-- row 14 -->

−

{{Tbl-line|align=left|'''UFS+J'''}}

+

{{Tbl-line|align=left|'''UFS+S'''}}

−

{{Tbl-line|PC-BSD}}

+

{{Tbl-line|PC-BSD®}}

−

{{Tbl-line|align=left|check if your Linux distro provides ufsutils;<br>r/w support on Mac;<br>{{citelink|url=http://www.ufsexplorer.com/download_stdr.php|UFS Explorer}} can be used on Windows}}

+

{{Tbl-line|align=left|check if your Linux distro provides ufsutils;<br>r/w support on Mac;<br>{{citelink|url=http://www.ufsexplorer.com/download_stdr.php|txt=UFS Explorer}} can be used on Windows}}

{{Tbl-line|align=left|changed to r/o support in Mac Lion}}

{{Tbl-line|align=left|changed to r/o support in Mac Lion}}

|-

|-

<!-- row 15 -->

<!-- row 15 -->

−

{{Tbl-line|bg=ff|align=left|'''XFS'''}}

+

{{Tbl-line|bg=ff|align=left|'''UFS+J'''}}

−

{{Tbl-line|bg=ff|Linux}}

+

{{Tbl-line|bg=ff|PC-BSD®}}

−

{{Tbl-line|bg=ff|align=left|content=r/o support is loaded by default}}

+

{{Tbl-line|bg=ff|align=left|check if your Linux distro provides ufsutils;<br>r/w support on Mac;<br>{{citelink|url=http://www.ufsexplorer.com/download_stdr.php|txt=UFS Explorer}} can be used on Windows}}

−

{{Tbl-line|bg=ff|align=left|}}

+

{{Tbl-line|bg=ff|align=left|changed to r/o support in Mac Lion}}

|-

|-

<!-- row 16 -->

<!-- row 16 -->

−

{{Tbl-line|align=left|'''ZFS'''}}

+

{{Tbl-line|align=left|'''XFS'''}}

−

{{Tbl-line|PC-BSD, OpenSolaris}}

+

{{Tbl-line|Linux}}

+

{{Tbl-line|align=left|content=r/o support is loaded by default}}

{{Tbl-line|align=left|}}

{{Tbl-line|align=left|}}

−

{{Tbl-line|align=left|{{citelink|url=http://zfsonlinux.org/|Linux port}};<br>Mac support is under {{citelink|url=http://code.google.com/p/maczfs/|development}}.}}

+

|-

+

<!-- row 17 -->

+

{{Tbl-line|bg=ff|align=left|'''ZFS'''}}

+

{{Tbl-line|bg=ff|PC-BSD®, OpenSolaris}}

+

{{Tbl-line|bg=ff|align=left|}}

+

{{Tbl-line|bg=ff|align=left|{{citelink|url=http://zfsonlinux.org/|txt=Linux port}};<br>Mac support is under {{citelink|url=http://code.google.com/p/maczfs/|txt=development}}.}}

|-

|-

|}

|}

−

=== Device Names ===

+

== Device Names ==

Linux and BSD use different naming conventions for devices. For example:

Linux and BSD use different naming conventions for devices. For example:

Some of the features used by BSD have similar counterparts to Linux, but the name of the feature is different. Table 1.4b provides some common examples:

Some of the features used by BSD have similar counterparts to Linux, but the name of the feature is different. Table 1.4b provides some common examples:

Line 130:

Line 137:

{{Tbl-init|width=100%}}

{{Tbl-init|width=100%}}

−

{{Tbl-title|width=25%|'''PC-BSD'''}}

+

{{Tbl-title|width=25%|'''PC-BSD®'''}}

{{Tbl-title|width=25%|'''Linux'''}}

{{Tbl-title|width=25%|'''Linux'''}}

{{Tbl-title|width=50%|'''Description'''}}

{{Tbl-title|width=50%|'''Description'''}}

Line 142:

Line 149:

{{Tbl-line|align=left|''/etc/rc.d/'' for operating system and ''/usr/local/etc/rc.d/'' for applications}}

{{Tbl-line|align=left|''/etc/rc.d/'' for operating system and ''/usr/local/etc/rc.d/'' for applications}}

{{Tbl-line|align=left|''rc0.d/'', ''rc1.d/'', etc.}}

{{Tbl-line|align=left|''rc0.d/'', ''rc1.d/'', etc.}}

−

{{Tbl-line|align=left|in PC-BSD the directories containing the startup scripts do not link to runlevels as there are no runlevels; system startup scripts are separated from third-party application scripts}}

+

{{Tbl-line|align=left|in PC-BSD® the directories containing the startup scripts do not link to runlevels as there are no runlevels; system startup scripts are separated from third-party application scripts}}

|-

|-

<!-- row 3 -->

<!-- row 3 -->

Line 151:

Line 158:

|}

|}

−

=== Commands ===

+

== Commands ==

−

If you're comfortable with the command line, you may find that some of the commands that you are used to have different names on BSD. Table 1.4c lists some common commands and their equivalents.

+

If you are comfortable with the command line, you may find that some of the commands that you are used to have different names on BSD. Table 1.4c lists some common commands and what they are used for.

'''Table 1.4c: Common BSD and Linux Commands'''

'''Table 1.4c: Common BSD and Linux Commands'''

{{Tbl-init|width=100%}}

{{Tbl-init|width=100%}}

−

{{Tbl-title|width=25%|'''PC-BSD'''}}

+

{{Tbl-title|width=25%|'''Command'''}}

−

{{Tbl-title|width=25%|'''Linux'''}}

+

{{Tbl-title|width=50%|'''Used to:'''}}

−

{{Tbl-title|width=50%|'''Result'''}}

+

|-

|-

<!-- row 1 -->

<!-- row 1 -->

{{Tbl-line|bg=ff|align=left|'''dmesg'''}}

{{Tbl-line|bg=ff|align=left|'''dmesg'''}}

−

{{Tbl-line|bg=ff|align=left|'''dmesg'''<br>'''lsdev''' (Is this used anywhere?)}}

{{Tbl-line|bg=ff|align=left|discover what hardware was detected by the kernel}}

{{Tbl-line|bg=ff|align=left|discover what hardware was detected by the kernel}}

A common complaint is that the size of PC-BSD® PBI files are much larger than the actual program. What complaints of this sort often do not recognize is that very few installable applications are complete by themselves. If you take a look at what happens while the program is being compiled, or when you install a package, you will notice that there are additional applications being pulled in or downloaded and installed. These are all dependencies: things that the program will require in order to fully function. An application of any complexity, especially if it is desktop-oriented, is likely to depend upon many programs. These programs may relate to audio or video playback, window management, or libraries for encoding, compression, encryption.

A PBI file consists of the primary application, determined by its name, along with all of its dependencies. When you add a program with AppCafe{{r}}, you download the application and dependency bundle that we call a PBI. The first set of dependencies may be reused by other applications that you install later; however, every PBI file contains all the necessary dependencies, even if those that would be redundant are not installed.

* {{citelink|url=http://www.freebsd.org/doc/en/articles/bsdl-gpl/article.html|txt=Why you should use a BSD style license for your Open Source Project}}

<noinclude>{{refheading}}</noinclude>

<noinclude>{{refheading}}</noinclude>

Line 249:

Line 256:

[[category:handbook]]

[[category:handbook]]

[[category:introduction]]

[[category:introduction]]

−

[[category:PC-BSD for Linux Users]]

+

[[category:PC-BSD® for Linux Users]]

</noinclude>

</noinclude>

Revision as of 03:29, 9 December 2012

(Sorry for the inconvenience)

Editor: please update template:UseTOC/9.2

Translator: please use {{UseTOC{{putVers}}|TOC}}

Protection (edit): sysopEdited by: Tigersharke

PC-BSD® is based on BSD Unix[1], meaning that it is not a Linux distribution. If you have used Linux before, you will find that some features that you are used to have different names on a BSD system and that some commands are different. This section covers some of these differences.

Contents

Filesystems

BSD and Linux use different filesystems during installation. Many Linux distros use EXT2, EXT3, EXT4, or ReiserFS, while PC-BSD® uses UFS or ZFS. This means that if you wish to dual-boot with Linux or access data on an external drive that has been formatted with another filesystem, you will want to do a bit of research first to see if the data will be accessible to both operating systems.

Table 1.4a summarizes the various filesystems commonly used by desktop systems. Most of the desktop managers available from PC-BSD® should automatically mount the following filesystems: FAT16, FAT32, EXT2, EXT3 (without journaling), EXT4 (read-only), NTFS5, NTFS6, and XFS. See the section on Files and File Sharing for more information about available file manager utilities.

Device Names

Linux and BSD use different naming conventions for devices. For example:

in Linux, Ethernet interfaces begin with eth; in BSD, interface names indicate the name of the driver. For example, an Ethernet interface may be listed as re0, indicating that it uses the Realtek re driver. The advantage of this convention is that you can read the man 4 page for the driver (e.g. type man 4 re) to see which models and features are provided by that driver.

Feature Names

Some of the features used by BSD have similar counterparts to Linux, but the name of the feature is different. Table 1.4b provides some common examples:

Figure 1.4b: Names for BSD and Linux Features

Table 1.4needs a caption: {{tbl-init|caption=a. is the caption}}
Please use alternative templates.
Please use alternative templates.
Please use alternative templates.

PF

iptables

default firewall

/etc/rc.d/ for operating system and /usr/local/etc/rc.d/ for applications

rc0.d/, rc1.d/, etc.

in PC-BSD® the directories containing the startup scripts do not link to runlevels as there are no runlevels; system startup scripts are separated from third-party application scripts

/etc/ttys and /etc/rc.conf

telinit and init.d/

terminals are configured in ttys and rc.conf indicates which services will start at boot time

Commands

If you are comfortable with the command line, you may find that some of the commands that you are used to have different names on BSD. Table 1.4c lists some common commands and what they are used for.

Table 1.4c: Common BSD and Linux Commands

Table 1.4needs a caption: {{tbl-init|caption=a. is the caption}}
Please use alternative templates.
Please use alternative templates.

dmesg

discover what hardware was detected by the kernel

sysctl dev

display configured devices

pciconf -l -cv

show PCI devices

dmesg | grep usb

show USB devices

kldstat

list all modules loaded in the kernel

kldload <module>

load a kernel module for the current session

pbi_add -r <pbiname>

install software from the command line

sysctl hw.realmem

display hardware memory

sysctl hw.model

display CPU model

sysctl hw.machine_arch

display CPU Architecture

sysctl hw.ncpu

display number of CPUs

uname -vm

get release version information

gpart show

show device partition information

fuser

list IDs of all processes that have one or more files open

file formats, size and updates

A common complaint is that the size of PC-BSD® PBI files are much larger than the actual program. What complaints of this sort often do not recognize is that very few installable applications are complete by themselves. If you take a look at what happens while the program is being compiled, or when you install a package, you will notice that there are additional applications being pulled in or downloaded and installed. These are all dependencies: things that the program will require in order to fully function. An application of any complexity, especially if it is desktop-oriented, is likely to depend upon many programs. These programs may relate to audio or video playback, window management, or libraries for encoding, compression, encryption.

A PBI file consists of the primary application, determined by its name, along with all of its dependencies. When you add a program with AppCafe®, you download the application and dependency bundle that we call a PBI. The first set of dependencies may be reused by other applications that you install later; however, every PBI file contains all the necessary dependencies, even if those that would be redundant are not installed.

Additional Resources

The following articles and videos provide additional information about some of the differences between BSD and Linux: