Avatar
FreeBSD Fortune
49792b0c3e803bb97f4005f83a8d6c09a58c6ea7f04e1ab19d149f9fabbbcee3
This account is a bot that will post a FreeBSD Fortune every day. Subscribe, comment, and share!

To see the MAC addresses of the NICs on your system, type

ifconfig -a

-- Dru

This fortune brought to you by:

$FreeBSD$

Do you want to run a program directly after some other process has ended? Use

"pwait pid && new_program"

-- Lars Engels

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

In order to make fetch (the FreeBSD downloading tool) ask for

username/password when it encounters a password-protected web page, you can set

the environment variable HTTP_AUTH to 'basic:*'.

Need to do a search in a manpage or in a file you've sent to a pager? Use

"/search_word". To repeat the same search, type "n" for next or "p" for

previous.

-- Dru

You can change the video mode on all consoles by adding something like

the following to /etc/rc.conf:

allscreens="80x30"

You can use "vidcontrol -i mode | grep T" for a list of supported text

modes.

-- Konstantinos Konstantinidis

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

Man pages are divided into section depending on topic. There are 9 different

sections numbered from 1 (General Commands) to 9 (Kernel Developer's Manual).

You can get an introduction to each topic by typing

man intro

In other words, to get the intro to general commands, type

man 1 intro

Do you wonder what a terminal program is doing at the moment? dd(1) does not

show any throughput? Hit "^T" (Control + t) to send SIGINFO to the process

and see what it is doing.

-- Lars Engels

"man ports" gives many useful hints about installing FreeBSD ports.

You can use aliases to decrease the amount of typing you need to do to get

commands you commonly use. Examples of fairly popular aliases include (in

Bourne shell style, as in /bin/sh, bash, ksh, and zsh):

alias lf="ls -FA"

alias ll="ls -lA"

alias su="su -m"

In csh or tcsh, these would be

alias lf ls -FA

alias ll ls -lA

alias su su -m

To remove an alias, you can usually use 'unalias aliasname'. To list all

aliases, you can usually type just 'alias'.

If you have a CD-ROM drive in your machine, you can make the CD-ROM that is

presently inserted available by typing 'mount /cdrom' as root. The CD-ROM

will be available under /cdrom/. Remember to do 'umount /cdrom' before

removing the CD-ROM (it will usually not be possible to remove the CD-ROM

without doing this.)

Note: This tip may not work in all configurations.

"man hier" will explain the way FreeBSD filesystems are normally laid out.

-- David Scheidt

Need to remove all those ^M characters from a DOS file? Try

tr -d \\r < dosfile > newfile

-- Originally by Dru

You can look through a file in a nice text-based interface by typing

less filename

To clear the screen, use "clear". To re-display your screen buffer, press

the scroll lock key and use your page up button. When you're finished,

press the scroll lock key again to get your prompt back.

-- Dru

To easily configure your installed FreeBSD use bsdconfig(8).

-- Lars Engels

To learn more about what your system is doing, take a look at systat(1). For

example, to get various statistics related to virtual memory usage, process

scheduling, device interrupts, system name translation caching, and disk I/O,

enter the following:

systat -vmstat

Other values are icmp, icmp6, ifstat, iostat, ip, ip6, netstat, pigs, sctp,

swap, tcp, or zarc. You can switch between displays using : and exit

back to your shell by typing

:quit

-- Benedict Reuschling

Need to find the location of a program? Use "locate program_name".

-- Dru