Do you want to do a binary upgrade of your running FreeBSD installation? Use freebsd-update(8).
To install updates and patches for the running branch use
# freebsd-update fetch install
To upgrade to a newer release use
# freebsd-update upgrade -r ${name_of_release}
-- Lars Engels
Sometimes a single slow HDD can cripple the performance of your entire system. You can spot one like this:
# gstat -I5s | sort -rn -k9 | head
-- Alan Somers
%
To determine whether a file is a text file, executable, or some other type
of file, use
file filename
-- Dru
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
-- Dru
You can use "pkg info" to see a list of packages you have installed.
"man security" gives very good advice on how to tune the security of your
FreeBSD system.
nc(1) (or netcat) is useful not only for redirecting input/output to
TCP or UDP connections, but also for proxying them with inetd(8).
The "zfs list" command can be filtered in multiple ways. To display just
the dataset name, use the -o parameter:
zfs list -o name mypool/usr
More columns and their order can be defined by separating them with commas:
zfs list -o mountpoint,name,avail
-- Benedict Reuschling
You can make a log of your terminal session with script(1).
A user "sender" needs the following permissions set to send a ZFS dataset:
# zfs allow -u sender send,snapshot txpool
On the receiving side, the user "receiver" requires these permissions:
# zfs allow -u receiver compression,mountpoint,mount,create,receive rxpool
-- Benedict Reuschling
If other operating systems have damaged your Master Boot Record, you can
reinstall it with gpart(8). See
"man gpart" for details.
To find out the hostname associated with an IP address, use
drill -x IP_address
-- Dru
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
-- Dru
ZFS keeps a history of commands run against a specific pool using the
history subcommand to zpool:
zpool history
More details are available using the -i and -l parameters. Note that ZFS
will not keep the complete pool history forever and will remove older
events in favor of never ones.
-- Benedict Reuschling
You can limit the depth of the displayed datasets in the "zfs list" output
using the -d parameter. To display only the first level of datasets below
mypool/usr and not the ones deeper than those, run this command:
zfs list -d 1 mypool/usr
-- Benedict Reuschling
Simple tcsh prompt: set prompt = '%# '
To display the compression ratio for the ZFS dataset /var/log on the pool
mypool, run the following command:
zfs get refcompressratio mypool/var/log
The refcompressratio will only display the compression ratio for that specific
dataset, not the descendant datasets. To include the child datasets, the
command looks like this:
zfs get compressratio mypool/var
-- Benedict Reuschling
To see all of the directories on your FreeBSD system, type
find / -type d | less
All the files?
find / -type f | less
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
-- Dru
When you want your users to be able to reboot or shutdown FreeBSD, add them
to the group "operator" and they are allowed to use shutdown(8) and poweroff(8).
-- Lars Engels