Links
- FreeBSD
- BSD For Linux Users :: Intro
- Use sysctl to do some stuff
typically done by
procfson 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 infoto list all installed packages.pkg install curlpkg info curl(info on installed curl.)pkg delete curl(uninstall)pkg audit -Fto check if there are known vulnerabilities in the installed packages.pkg autoremoveto remove packages that were installed implicitly as dependencies but are no longer referenced.pkg cleanto 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 fetchfollowed byportsnap extract.) Subsequent times,portsnap fetch updateis enough (same asportsnap fetchfollowed byportsnap update—fetchcan be followed by eitherextractorupdatein the same invocation.) - Install ports by running
make installin the port directory. (e.g./usr/ports/sysutils/lsof) - Uninstall by running
make deinstallfrom the same directory. - Upgrading ports
- Use
portmasterto upgrade ports.portmaster -ato upgrade all outdated ports andportmaster -afto upgrade and rebuild the ports if errors were encountered. - Or use
portupgrade.portupgrade -ato upgrade all outdated ports.portupgrade -R firefoxwould upgrade firefox and all its dependencies (-Ris important so that the deps are also upgraded.)
- Use