---
name: "setfib"
section: "1"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/setfib"
---

# setfib(1)

execute a utility with an altered default network view

## NAME

**setfib** – execute a utility with an altered default network view

## SYNOPSIS

**setfib** \[**-F**\] *fib* *utility* \[*argument* *...*\]

## DESCRIPTION

The **setfib** utility runs another *utility* with a different routing table. The table number *fib* will be used by default for all sockets started by this process or descendants.

## ENVIRONMENT

The PATH environment variable is used to locate the requested *utility* if the name contains no ‘/’ characters.

## EXIT STATUS

If *utility* is invoked, the exit status of **setfib** is the exit status of *utility*.

An exit status of 126 indicates *utility* was found, but could not be executed. An exit status of 127 indicates *utility* could not be found.

## EXAMPLES

Run [netstat(1)](/netstat/1.md) to view the second routing table.

```
setfib -F 1 netstat -rn
```

or

```
setfib 1 netstat -rn
```

or

```
setfib -1 netstat -rn
```

## SEE ALSO

[setfib(2)](/setfib/2.md), [setsockopt(2)](/setsockopt/2.md)

## STANDARDS

The **setfib** utility is a FreeBSD specific extension. However, manyUNIX- like systems have an equivalent function.

## HISTORY

The **setfib** utility appeared in FreeBSD 7.1.
