"man security" gives very good advice on how to tune the security of your
FreeBSD system.
fbfortune@mastodon.bsd.cafe
Posts
-
"man security" gives very good advice on how to tune the security of yourFreeBSD system. -
To make the "zfs list" output more script-friendly, you can suppress theoutput of the headers for each column by passing the -H parameter:To make the "zfs list" output more script-friendly, you can suppress the
output of the headers for each column by passing the -H parameter:zfs list -H
Another helpful option for script writers is -p, which displays the numbers
in non-rounded, exact values:zfs list -p
-- Benedict Reuschling <bcr@FreeBSD.org>
-
To set a custom ZFS property on the mypool pool, you need to provide itusing the "key1:key2=value" syntax, where the colon (:) is used as theseparator and identifier from the built-in ZFS properties:To set a custom ZFS property on the mypool pool, you need to provide it
using the "key1:key2=value" syntax, where the colon (:) is used as the
separator and identifier from the built-in ZFS properties:# zfs set warranty:expires=2038-01-19 mypool
The custom property is applied to all datasets and can be queried like any
built-in properties using zfs get:zfs get warranty:expires mypool
To reset the value of a custom property, use the inherit subcommand:
# zfs inherit warranty:expires mypool
Removing a custom property from a pool is done using the -r flag to the
"zfs inherit" command:# zfs inherit -r warranty:expires mypool
-- Benedict Reuschling <bcr@FreeBSD.org>
-
This fortune brought to you by:$FreeBSD$This fortune brought to you by:
$FreeBSD$ -
The output of "zfs list" can be sorted by a specific column using -s.The output of "zfs list" can be sorted by a specific column using -s. To
sort the datasets by the "used" column in ascending order, run this command:zfs list -s used
To sort in descending order instead, use -S:
zfs list -S used
-- Benedict Reuschling <bcr@FreeBSD.org>
-
If you want to recursively copy a directory preserving file and directoryattributes use"cp -a source target"If you want to recursively copy a directory preserving file and directory
attributes use
"cp -a source target"-- Lars Engels <lme@FreeBSD.org>
-
You can use /etc/make.conf to control the options used to compile softwareon this system.You can use /etc/make.conf to control the options used to compile software
on this system. Example entries are in
/usr/share/examples/etc/make.conf and in make.conf(5).
For options that are set for building FreeBSD's kernel and its world, see
src.conf(5). -
You can prevent the removal of a ZFS snapshot by using the hold subcommandYou can prevent the removal of a ZFS snapshot by using the hold subcommand.
For example, to prevent the snapshot called milestone from deletion, run the
following command:# zfs hold milestone_hold mypool/projects@my_milestone
The "zfs holds" command will list all current snapshots that are protected
this way (-r for a recursive list):# zfs holds -r mypool
The TIMESTAMP column in the output of the above command is from when the
hold was created, not the snapshot it holds. The "zfs destroy" command will
echo a "dataset is busy" message on the console when it encounters a hold.
Use "zfs release" to release the hold on the snapshot:# zfs release milestone_hold mypool/projects@my_milestone
-- Benedict Reuschling <bcr@FreeBSD.org>
-
You can automatically download and install binary packages by doingYou can automatically download and install binary packages by doing
pkg install <package>
This will also automatically install the packages that are dependencies
for the package you install (ie, the packages it needs in order to work.) -
You can disable tcsh's terminal beep if you `set nobeep'.You can disable tcsh's terminal beep if you `set nobeep'.
-
ZFS keeps a history of commands run against a specific pool using thehistory subcommand to zpool: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 <bcr@FreeBSD.org> -
Forget what directory you are in?Forget what directory you are in? Type "pwd".
-- Dru <genesis@istar.ca> -
When using ZFS as the file system the "df" command is reporting the pool sizeand not file system sizes.When using ZFS as the file system the "df" command is reporting the pool size
and not file system sizes. It also does not know about descendent ZFS
datasets, snapshots, quotas, and reservations with their individual space usage.
Use the built-in "zfs list" command to get a better overview of space usage:zfs list -o space
-- Benedict Reuschling <bcr@FreeBSD.org>
-
ZFS can display I/O statistics for a given pool using the iostat subcommandZFS can display I/O statistics for a given pool using the iostat subcommand.
By default, it will display one line of current activity. To display stats
every 5 seconds run the following command (cancel with CTRL+C):zpool iostat 5
To view individual disk activities, specify the -v parameter:
zpool iostat -v
Of course, both can be combined. For more options, see zpool(8).
-- Benedict Reuschling <bcr@FreeBSD.org> -
You can adjust the volume of various parts of the sound system in yourcomputer by typing 'mixer <type> <volume>'.You can adjust the volume of various parts of the sound system in your
computer by typing 'mixer <type> <volume>'. To get a list of what you can
adjust, just type 'mixer'. -
Forget when Easter is?Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
-- Dru <genesis@istar.ca> -
Can't delete /usr/obj?Can't delete /usr/obj? Enter "chflags -R noschg /usr/obj" to remove the
system immutable flag for all files in /usr/obj.-- Lars Engels <lme@FreeBSD.org>
-
Are you looking for a package?Are you looking for a package? Search for it with
"pkg search part_of_package_name"-- Lars Engels <lme@FreeBSD.org>
-
When you want your users to be able to reboot or shutdown FreeBSD, add themto the group "operator" and they are allowed to use shutdown(8) and poweroff(8).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 <lme@FreeBSD.org>
-
nc(1) (or netcat) is useful not only for redirecting input/output toTCP or UDP connections, but also for proxying them with inetd(8).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).