First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1BSD Installation and Software Management
On a FreeBSD system, which command installs a binary package from the configured repositories while resolving and installing its dependencies automatically?
- pkg register
- pkg install Correct answer.
- pkg add
- pkg create
Explanation
pkg install resolves dependencies from the remote repository metadata and installs the named package together with everything it needs. pkg add is for installing a local package file and does not consult repositories for dependencies. The other subcommands handle registration and package creation, not repository-based installation.
Question 2BSD Installation and Software Management
Which file on a FreeBSD system holds the list of package repositories that pkg(8) queries for binary packages?
- /usr/local/etc/pkg.conf
- /etc/pkg/FreeBSD.conf Correct answer.
- /etc/portsnap.conf
- /etc/make.conf
Explanation
The default repository configuration shipped with the base system lives in /etc/pkg/FreeBSD.conf, which points pkg at the official mirrors. Administrators can override or extend repositories in /usr/local/etc/pkg/repos. The other files serve unrelated purposes such as portsnap or ports builds.
Question 3BSD Installation and Software Management
A FreeBSD administrator wants to install a package without its automatic dependencies being recorded as manually installed. Which pkg subcommand displays which packages were installed automatically as dependencies?
- pkg query Correct answer.
- pkg autoremove
- pkg audit
- pkg info
Explanation
pkg query can filter installed-package metadata using %a, the automatic-installation flag. For example, pkg query -e '%a = 1' '%n' lists the names of all packages marked automatic, including dependencies that are still needed. pkg autoremove targets only unneeded automatic dependencies.
Question 4BSD Installation and Software Management
Which command refreshes the local pkg catalog so that newly published package versions become visible to pkg install?
- pkg update Correct answer.
- pkg clean
- pkg fetch
- pkg upgrade
Explanation
pkg update downloads fresh repository metadata, making new package versions available for installation. pkg upgrade then applies available upgrades to installed packages. Fetch and clean deal with downloading and clearing cached package files, not refreshing catalog metadata.
Question 5BSD Installation and Software Management
When installing FreeBSD from the bsdinstall installer, which menu is used to choose between a full installation and a limited set of system components?
- Root Password
- Distribution Select Correct answer.
- Partitioning
- Network Configuration
Explanation
The Distribution Select screen lets the installer choose which distribution sets to install, such as the base system, kernel, and optional components. Partitioning handles disk layout, while network and password screens configure runtime settings. Selecting distributions determines what system components end up on disk.
Question 6BSD Installation and Software Management
During a FreeBSD installation, the administrator wants the system to boot using UEFI. Which partitioning scheme should be selected in bsdinstall?
- APM
- BSD disklabel
- GPT Correct answer.
- MBR
Explanation
UEFI firmware on modern hardware requires a GUID Partition Table so that an EFI system partition can be created. MBR is the legacy scheme associated with BIOS booting. APM is the Apple partition map and BSD disklabel is a nested partitioning layer, neither of which provides UEFI boot support.
Question 7BSD Installation and Software Management
Which file does the FreeBSD installer read to apply post-installation configuration such as adding users or enabling services automatically?
- /etc/installerconfig Correct answer.
- /etc/fstab
- /boot/loader.conf
- /etc/rc.conf
Explanation
bsdinstall supports scripted installations that read /etc/installerconfig to perform configuration steps after the base system is unpacked. rc.conf controls runtime services on a running system, fstab defines mounts, and loader.conf configures the boot loader. The installerconfig file is the automation hook for post-install tasks.
Question 8BSD Installation and Software Management
On FreeBSD, which command creates a new user account interactively and also creates the home directory and sets the password?
- adduser Correct answer.
- vipw
- pw useradd
- useradd
Explanation
adduser is the interactive front end that walks through account creation, creates the home directory from a skeleton, and prompts for a password. pw useradd is the low-level non-interactive tool and does not prompt. useradd is not the standard FreeBSD interactive tool, and vipw edits the password database directly.
Question 9BSD Installation and Software Management
Which command on FreeBSD adds a user to the wheel group so the account can use su to become root?
- usermod -aG wheel alice
- pw usermod wheel -g alice
- groupadd -a alice wheel
- pw groupmod wheel -m alice Correct answer.
Explanation
pw groupmod with the -m flag adds an existing user as a member of the named group without removing other members. The other forms either misuse pw flags or use Linux-style tools that are not part of the base FreeBSD userland. Group membership changes take effect at the next login.
Question 10BSD Installation and Software Management
A FreeBSD system needs additional software compiled from source with custom options. Which command is used to fetch and extract the ports tree?
- cvsup ports
- portsnap fetch extract Correct answer.
- make fetchindex
- pkg fetch ports
Explanation
portsnap fetch extract downloads the compressed ports tree snapshot and extracts it into /usr/ports. The other commands either belong to pkg, to obsolete tooling, or to index generation rather than obtaining the tree itself. On current releases git is also used, but among these choices portsnap is the correct tree-fetching tool.
Question 11BSD Installation and Software Management
Inside a ports directory, which command installs the port along with its dependencies while honoring any options selected in the configuration dialog?
- make config
- make install Correct answer.
- make build
- make clean
Explanation
make install in a port directory builds the software if needed, resolves and installs dependencies, and installs the result. The configuration dialog is presented as part of the build when options are unset. The other targets either only build, only configure, or remove work files.
Question 12BSD Installation and Software Management
Which ports framework variable should be set to suppress interactive configuration prompts during an unattended rebuild?
- OPTIONS_SET
- WITH_OPTIONS
- BATCH Correct answer.
- DIALOGOPTIONS
Explanation
Setting BATCH=yes suppresses interactive configuration prompts, allowing unattended ports builds to use saved options or defaults. It does not save selected options itself; interactive selections are recorded through make config in the options database.
Question 13BSD Installation and Software Management
Which command reports which installed package owns a particular file, such as /usr/local/bin/bash?
- pkg files
- pkg search
- pkg which Correct answer.
- pkg info
Explanation
pkg which maps a file path back to the installed package that provides it. pkg info shows metadata for a named package, pkg search queries the repository catalog, and pkg files lists the files belonging to a package. Only pkg which performs the reverse lookup from file to package.
Question 14BSD Installation and Software Management
An administrator wants to see only the packages installed manually, excluding automatic dependencies. Which pkg query expression accomplishes this?
- pkg query -a '%n %v'
- pkg query -a '%n %a'
- pkg query -e '%a = 0' '%n' Correct answer.
- pkg query -a '%n'
Explanation
The automatic flag is stored in package metadata and can be filtered with the -e expression option. Using -e '%a = 0' restricts output to manually installed packages. The other forms print names or versions for all packages without filtering on the automatic flag.
Question 15BSD Installation and Software Management
Which command removes an installed package together with dependencies that are no longer needed?
- pkg purge
- pkg autoremove Correct answer.
- pkg remove --auto
- pkg delete -A
Explanation
pkg autoremove removes packages marked as automatically installed that no longer have any dependent package requiring them. pkg delete removes a named package but leaves orphaned dependencies behind. The other options are not valid pkg subcommand forms for this task.
Question 16BSD Installation and Software Management
Which file on FreeBSD defines the filesystems mounted at boot, including the root filesystem entry?
- /etc/devfs.conf
- /etc/fstab Correct answer.
- /etc/rc.conf
- /boot/defaults/loader.conf
Explanation
/etc/fstab lists filesystems with their mount points, types, and options, and is read at boot to mount everything including root. rc.conf controls services, loader.conf sets boot tunables, and devfs.conf controls device node permissions. Only fstab governs filesystem mounts.
Question 17BSD Installation and Software Management
A FreeBSD server must install a package from a local .pkg file without contacting any repository. Which command is appropriate?
- pkg fetch ./custom.pkg
- pkg install ./custom.pkg
- pkg add ./custom.pkg Correct answer.
- pkg create ./custom.pkg
Explanation
pkg add installs a package directly from a local file or URL and does not require repository metadata. pkg install expects a package name from a repository. pkg fetch downloads packages and pkg create builds a package from installed files.
Question 18BSD Installation and Software Management
Which bsdinstall step must be performed before the installer can write the base system to disk?
- Setting the root password
- Selecting and partitioning the target disk Correct answer.
- Configuring the network interface
- Adding user accounts
Explanation
The installer needs a partitioned and mounted target before it can extract the distribution sets onto it. Network configuration, root password, and user creation are configuration steps that can occur around the installation but are not prerequisites for writing the base system. Disk selection and partitioning therefore come first.
Question 19BSD Installation and Software Management
Which command shows the pkg version and confirms that the package manager database is initialized on a FreeBSD system?
- pkg -v Correct answer.
- pkg stats
- pkg info -a
- pkg bootstrap
Explanation
pkg -v prints the version of the pkg utility and is a quick check that pkg is present. If pkg is not yet bootstrapped, running it triggers the bootstrap process. The other commands operate on package data rather than simply reporting the tool version.
Question 20BSD Installation and Software Management
An administrator needs to build a port in a clean environment without installing it on the host. Which target produces a package file that can be installed elsewhere?
- make reinstall
- make deinstall
- make package Correct answer.
- make install
Explanation
make package builds the port if necessary and creates a binary package file in the port's work directory, which can then be copied and installed on another system. make install installs onto the local host, while deinstall and reinstall manipulate an existing installation.
Question 21BSD Installation and Software Management
Which command lists all installed packages along with their versions on FreeBSD?
- pkg info Correct answer.
- pkg show
- pkg list
- pkg search
Explanation
pkg info with no arguments lists the installed packages and their versions from the local database. pkg list is not the standard subcommand for this, pkg search queries remote repositories, and pkg show is not a valid subcommand. The local database is the authoritative source for installed package versions.
Question 22BSD Installation and Software Management
Which file controls whether a service such as sshd starts automatically at boot on FreeBSD?
- /etc/resolv.conf
- /etc/hosts
- /etc/services
- /etc/rc.conf Correct answer.
Explanation
/etc/rc.conf holds variables such as sshd_enable="YES" that the rc system reads at boot to start services. /etc/services maps service names to ports, /etc/hosts resolves hostnames locally, and /etc/resolv.conf configures DNS. Only rc.conf governs service startup.
Question 23BSD Installation and Software Management
After editing /etc/rc.conf to enable a new service, which command starts it immediately without rebooting?
- service sshd start Correct answer.
- sysrc sshd start
- rc.conf reload
- pkg start sshd
Explanation
The service command invokes the rc script for the named service with the requested action, so service sshd start launches it right away. sysrc edits rc.conf variables but does not start services. The other forms are not valid ways to start a service.
Question 24BSD Installation and Software Management
A FreeBSD administrator wants to change the hostname persistently. Which command modifies the correct rc.conf variable in one step?
- sysctl hostname=server1
- hostname server1
- sysrc hostname=server1 Correct answer.
- ifconfig hostname server1
Explanation
sysrc safely edits the named variable in /etc/rc.conf, making the change persistent across reboots. The hostname command changes it only for the current session, sysctl does not manage hostname this way, and ifconfig configures interfaces. Using sysrc avoids manual editing errors.
Question 25BSD Installation and Software Management
Which pkg subcommand checks installed packages against a database of known security vulnerabilities?
- pkg verify
- pkg vuln
- pkg check
- pkg audit Correct answer.
Explanation
pkg audit compares installed package versions against a vulnerability database and reports affected packages. pkg check verifies the integrity of installed files, pkg verify is not the standard subcommand for this, and pkg vuln is not a valid subcommand. Auditing is the security-review step in package maintenance.
Question 26BSD Installation and Software Management
On FreeBSD, an administrator wants to verify which repository catalog the local pkg database was last synchronized against before installing new software. Which file holds the repository configuration used by pkg?
- /etc/make.conf
- /etc/portsnap.conf
- /usr/local/etc/pkg.conf
- /etc/pkg/FreeBSD.conf Correct answer.
Explanation
The pkg tool reads repository definitions from configuration files under /etc/pkg/, and the default FreeBSD repository is declared in /etc/pkg/FreeBSD.conf. That file sets the URL, mirror type, and signature type for the repository the package database synchronizes with.
Question 27BSD Installation and Software Management
A FreeBSD administrator wants binary packages built with a specific ABI, for example FreeBSD:14:amd64, rather than the value auto-detected from the running kernel. Which pkg configuration setting controls this?
- SIGNATURE_TYPE
- MIRROR_TYPE
- ABI Correct answer.
- ARCH
Explanation
The ABI setting in pkg.conf overrides the automatically detected application binary interface, so pkg fetches packages built for the named platform and release. This is useful when installing packages for a different FreeBSD major version than the one currently running.
Question 28BSD Installation and Software Management
During a scripted FreeBSD installation, an administrator needs to install the base system onto a disk that was already partitioned and had filesystems created and mounted under /mnt. Which bsdinstall subcommand performs just the base extraction step?
- bsdinstall install Correct answer.
- bsdinstall script
- bsdinstall distfetch
- bsdinstall jail
Explanation
The bsdinstall install step extracts the base system distribution sets onto the target mounted at /mnt, and it can be invoked on its own when partitioning and mounting were handled separately. Scripted installs commonly chain individual bsdinstall subcommands rather than running the full interactive menu.
Question 29BSD Installation and Software Management
An administrator is preparing an unattended FreeBSD installation and needs the distribution sets to be fetched from an FTP mirror before extraction. Which bsdinstall subcommand retrieves the distribution sets?
- bsdinstall extract
- bsdinstall config
- bsdinstall distfetch Correct answer.
- bsdinstall auto
Explanation
The distfetch subcommand downloads the selected distribution sets, such as base and kernel, to the working directory so they can later be extracted. It is a separate step from extraction, which lets a script fetch once and install repeatedly.
Question 30BSD Installation and Software Management
A FreeBSD administrator wants to install a port with its default options without any interactive configuration prompt, even if options were never saved before. Which make invocation achieves this?
- make install clean BATCH=yes Correct answer.
- make deinstall reinstall
- make config recursive
- make install clean WITH_OPTIONS=no
Explanation
Setting BATCH=yes makes the ports framework skip the interactive options dialog and accept the defaults, which suits unattended builds. It is commonly combined with install and clean to fetch, build, install, and remove the work directory in one pass.
Question 31BSD Installation and Software Management
After a FreeBSD source upgrade, an administrator wants to remove obsolete files left in the system from the previous version. Which target of the source tree's Makefile performs this cleanup?
- make buildworld
- make delete-old Correct answer.
- make installkernel
- make distrib-dirs
Explanation
The delete-old target removes files that belonged to the previous world and are no longer part of the installed system, and delete-old-libs handles superseded shared libraries. Running it after installworld keeps the system free of stale binaries that could confuse the runtime linker.
Question 32BSD Installation and Software Management
Which FreeBSD command verifies that the files installed by the base system match the checksums recorded in the distribution manifest?
- mtree -f /etc/mtree/BSD.root.dist
- freebsd-version -k
- service -e
- pkg check -s Correct answer.
Explanation
The pkg check command with the checksum flag validates installed package files against recorded checksums, but base system files are not tracked by pkg, so that tool does not cover them. For the base system, mtree compares the installed files against the hierarchy specifications shipped in /etc/mtree.
Question 33Storage Devices and BSD Filesystems
On a FreeBSD system, which device node refers to the third partition (slice) of the first SCSI disk under the CAM/ada naming scheme?
- /dev/da0s3
- /dev/ada0p3
- /dev/ad0s3
- /dev/ada0s3 Correct answer.
Explanation
FreeBSD uses the suffix s for MBR slices and p for GPT partitions, so the third MBR slice of the first ada disk is ada0s3. The ada driver handles ATA/SATA disks, while da covers SCSI/SAS/USB storage.
Question 34Storage Devices and BSD Filesystems
Which BSD command displays the partition table of a disk, including GPT entries, without modifying anything?
- tunefs ada0
- gpart show ada0 Correct answer.
- fsck ada0
- newfs ada0
Explanation
gpart show prints the current partition scheme and all partitions on the named disk. newfs creates a filesystem, tunefs alters filesystem parameters, and fsck checks filesystem consistency, so none of those merely display the table.
Question 35Storage Devices and BSD Filesystems
You want to create a UFS2 filesystem on /dev/ada0p2 with soft updates enabled. Which command accomplishes this?
- newfs -j /dev/ada0p2
- newfs -l /dev/ada0p2
- newfs -U /dev/ada0p2 Correct answer.
- newfs -O 1 /dev/ada0p2
Explanation
The -U flag to newfs enables soft updates on the new filesystem. Soft updates maintain metadata ordering to keep the filesystem consistent without a full journal.
Question 36Storage Devices and BSD Filesystems
Which file in FreeBSD defines the filesystems mounted at boot time?
- /etc/mtab
- /etc/mount.conf
- /etc/fstab Correct answer.
- /etc/vfstab
Explanation
FreeBSD reads /etc/fstab during boot to determine which filesystems to mount and where. Each line lists device, mount point, filesystem type, options, dump and pass fields.
Question 37Storage Devices and BSD Filesystems
What does the fifth field of an /etc/fstab entry control on FreeBSD?
- The filesystem type
- The dump backup flag used by dump(8) Correct answer.
- The mount options string
- The fsck pass number
Explanation
The fifth field is the dump flag; a value of 1 tells dump(8) that the filesystem needs backing up. The sixth field is the fsck pass number, which is distinct.
Question 38Storage Devices and BSD Filesystems
Which command mounts all filesystems listed in /etc/fstab that are not marked noauto?
- mount -f
- mount -t all
- mount -a Correct answer.
- mount -u
Explanation
mount -a reads /etc/fstab and mounts every entry not flagged noauto. This is typically run during the boot sequence.
Question 39Storage Devices and BSD Filesystems
A disk reports a GPT with a protective MBR and you need to add a new partition. Which command creates a new GPT partition entry?
- gpart create -s gpt ada0
- gpart recover ada0
- gpart destroy -F ada0
- gpart add -t freebsd-ufs -s 20G ada0 Correct answer.
Explanation
gpart add inserts a new partition entry into an existing scheme, with -t setting the type and -s the size. The scheme must already exist on the disk before adding partitions.
Question 40Storage Devices and BSD Filesystems
Which ZFS command creates a new pool named tank using two disks mirrored?
- zpool create tank mirror ada1 ada2 Correct answer.
- zfs create tank mirror ada1 ada2
- zpool add tank mirror ada1 ada2
- zfs pool create tank mirror ada1 ada2
Explanation
zpool create builds a new storage pool, and the mirror keyword forms a two-way mirror from the listed devices. zfs create operates on datasets within an existing pool, not on pools themselves.
Question 41Storage Devices and BSD Filesystems
You want a ZFS dataset to store its data compressed with LZ4. Which command sets this on an existing dataset named tank/data?
- zpool set compression=lz4 tank/data
- zfs set compression=lz4 tank/data Correct answer.
- zfs create compression=lz4 tank/data
- tunefs -l lz4 tank/data
Explanation
zfs set assigns a property such as compression to a dataset. The value lz4 selects the LZ4 algorithm, which is the recommended default on modern OpenZFS.
Question 42Storage Devices and BSD Filesystems
Which ZFS feature protects against silent data corruption by storing and verifying checksums for every block?
- Soft updates
- GEOM striping
- End-to-end block checksums Correct answer.
- Journaled soft updates
Explanation
ZFS computes a checksum for every block and verifies it on read, detecting and, with redundancy, repairing corruption. This end-to-end checksumming is a core ZFS integrity feature.
Question 43Storage Devices and BSD Filesystems
What does the ZFS pool property autoexpand control?
- Whether datasets are automatically mounted at boot
- Whether a pool grows automatically when its underlying vdevs grow Correct answer.
- Whether compression is enabled by default
- Whether snapshots are created automatically
Explanation
autoexpand, when set to on, allows a pool to use additional capacity exposed by a grown underlying device, such as an enlarged virtual disk. It does not affect mounting or snapshots.
Question 44Storage Devices and BSD Filesystems
Which command shows detailed space usage of a ZFS pool and its datasets, including snapshot space?
- zpool iostat
- zfs get all
- zpool status -v
- zfs list -o space Correct answer.
Explanation
zfs list -o space displays used, available, referenced and snapshot-related space columns for datasets. It is the standard way to inspect where pool space is consumed.
Question 45Storage Devices and BSD Filesystems
How do you create a snapshot of the ZFS dataset tank/home named before_upgrade?
- zfs clone tank/home@before_upgrade
- zfs snapshot tank/home@before_upgrade Correct answer.
- zfs create tank/home@before_upgrade
- zpool snapshot tank/home before_upgrade
Explanation
Snapshots are named with the dataset followed by @ and the snapshot name, and are created with zfs snapshot. They are read-only point-in-time views.
Question 46Storage Devices and BSD Filesystems
Which GEOM class provides software RAID 1 mirroring on FreeBSD?
- gmirror Correct answer.
- gstripe
- gconcat
- geli
Explanation
gmirror is the GEOM class that implements RAID 1 mirroring across multiple providers. gstripe handles striping and gconcat handles concatenation.
Question 47Storage Devices and BSD Filesystems
What is the primary purpose of the geli GEOM class?
- Providing filesystem journaling
- Providing network block storage
- Providing block-level disk encryption Correct answer.
- Providing RAID 5 parity
Explanation
geli attaches to a provider and transparently encrypts its contents using the kernel crypto framework. It can also authenticate data and support key files or passphrases.
Question 48Storage Devices and BSD Filesystems
After creating a gmirror named gm0 from ada1 and ada2, which command shows the mirror's synchronization status?
- gmirror status gm0 Correct answer.
- zpool status gm0
- gmirror list ada1
- geom label status
Explanation
gmirror status reports each mirror component and whether it is active or being synchronized. This confirms the mirror is healthy after creation.
Question 49Storage Devices and BSD Filesystems
Which command grows a UFS filesystem after the underlying partition has been enlarged, without losing data?
- growfs /dev/ada0p2 Correct answer.
- newfs /dev/ada0p2
- fsck -f /dev/ada0p2
- dump -0 -f - /dev/ada0p2
Explanation
growfs expands an existing UFS filesystem to fill the enlarged partition while preserving its contents. It must be run on an unmounted or read-only filesystem.
Question 50Storage Devices and BSD Filesystems
What is the purpose of the fsck pass number in the sixth field of /etc/fstab?
- It defines the mount priority relative to other disks
- It controls the block size of the filesystem
- It sets the number of backup copies of the superblock
- It determines the order in which filesystems are checked at boot Correct answer.
Explanation
During boot, fsck checks filesystems in ascending pass order, with the root filesystem typically checked first. A value of 0 means the filesystem is skipped during the boot check.