Links
- FreeBSD
- BSD For Linux Users :: Intro
- Use sysctl to do some stuff
typically done by
procfs
on Linux. - Installing Applications: Packages and Ports
- MAC: Mandatory Access Control
- PF
- FreeBSD Gateway Hardening: Jails & Intrusion Detection With Snort
- Defend Your Network And Privacy: VPN Gateway With FreeBSD
pkr
: Binary Packages
pkg info
to list all installed packages.pkg install curl
pkg info curl
(info on installed curl.)pkg delete curl
(uninstall)pkg audit -F
to check if there are known vulnerabilities in the installed packages.pkg autoremove
to remove packages that were installed implicitly as dependencies but are no longer referenced.pkg clean
to remove stale packages (such as outdated versions after an upgrade.)
Ports: Source Packages
Ref: Using the Ports Collection
- Use
portaudit
(alsovxquery
?) to check for known security vulnerabilities in a port. e.g.portaudit -F
. (Uses vuxml.freebsd.org/) - The very first time, you should run
portsnap fetch extract
(same asportsnap fetch
followed byportsnap extract
.) Subsequent times,portsnap fetch update
is enough (same asportsnap fetch
followed byportsnap update
—fetch
can be followed by eitherextract
orupdate
in the same invocation.) - Install ports by running
make install
in the port directory. (e.g./usr/ports/sysutils/lsof
) - Uninstall by running
make deinstall
from the same directory. - Upgrading ports
- Use
portmaster
to upgrade ports.portmaster -a
to upgrade all outdated ports andportmaster -af
to upgrade and rebuild the ports if errors were encountered. - Or use
portupgrade
.portupgrade -a
to upgrade all outdated ports.portupgrade -R firefox
would upgrade firefox and all its dependencies (-R
is important so that the deps are also upgraded.)
- Use