<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Guide | FreeBSD Foundation</title>
	<atom:link href="https://freebsdfoundation.org/resource-type/guide/feed/" rel="self" type="application/rss+xml" />
	<link>https://freebsdfoundation.org</link>
	<description>A non-profit organization dedicated to supporting and building the FreeBSD Project</description>
	<lastBuildDate>Mon, 09 Feb 2026 21:01:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://freebsdfoundation.org/wp-content/uploads/2015/12/favicon.png</url>
	<title>Guide | FreeBSD Foundation</title>
	<link>https://freebsdfoundation.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Getting Started with FreeBSD</title>
		<link>https://freebsdfoundation.org/resource/getting-started-with-freebsd/</link>
		
		<dc:creator><![CDATA[Florine Kamdem]]></dc:creator>
		<pubDate>Thu, 29 Jan 2026 09:34:59 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=30401</guid>

					<description><![CDATA[<p>A centralized resource page for new FreeBSD users, showing how to get started with installation guides, desktop and virtual machine resources, and community links.</p>
<p>The post <a href="https://freebsdfoundation.org/resource/getting-started-with-freebsd/">Getting Started with FreeBSD</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor">
<p data-start="2181" data-end="2233"><strong>Updated: January 29, 2026</strong></p>
<p data-start="2235" data-end="2325">A centralized resource page for new FreeBSD users</p>
<p data-start="2235" data-end="2325">New to FreeBSD? This page brings together commonly used resources to help you get started.</p>
<p data-start="2327" data-end="2538">Whether you’re installing FreeBSD for the first time, exploring it in a virtual machine, or looking for ways to get involved, these links reflect tools and guides frequently recommended by the FreeBSD community.</p>
<p data-start="2540" data-end="2618">This page is intended as a starting point and will continue to grow over time.</p>
<p data-start="2540" data-end="2618">If you are looking for an introduction to the FreeBSD Project and ways to get involved, the FreeBSD Project maintains a dedicated <a href="https://www.freebsd.org/projects/newbies/"><strong data-start="1204" data-end="1215">Newbies</strong></a> page. The resources below complement that page with additional Foundation guides, installation resources, and community learning materials.</p>
<h2 data-start="2625" data-end="2658">Start Here: Core Documentation</h2>
<p data-start="2660" data-end="2739">If you’re new to FreeBSD, these official resources are the best place to begin.</p>
<h3 data-start="2741" data-end="2772">FreeBSD Handbook (Official)</h3>
<p data-start="2774" data-end="2911">The FreeBSD Handbook is the primary reference for FreeBSD users. It covers everything from initial installation to system administration.</p>
<p data-start="2913" data-end="2928">Topics include:</p>
<ul data-start="2929" data-end="3043">
<li data-start="2929" data-end="2955">
<p data-start="2931" data-end="2955">Installation and setup</p>
</li>
<li data-start="2956" data-end="2980">
<p data-start="2958" data-end="2980">System configuration</p>
</li>
<li data-start="2981" data-end="3018">
<p data-start="2983" data-end="3018">Networking, storage, and security</p>
</li>
<li data-start="3019" data-end="3043">
<p data-start="3021" data-end="3043">Desktop environments</p>
</li>
</ul>
<p data-start="3045" data-end="3137"><strong data-start="3139" data-end="3174">FreeBSD Handbook – Introduction</strong><br data-start="3174" data-end="3177" /><br />
<a class="decorated-link" href="https://docs.freebsd.org/en/books/handbook/parti/" target="_new" rel="noopener" data-start="3177" data-end="3226">https://docs.freebsd.org/en/books/handbook/parti/</a></p>
<p data-start="3045" data-end="3137"><strong data-start="3045" data-end="3080">FreeBSD Handbook – Installation</strong><br data-start="3080" data-end="3083" /><br />
<a class="decorated-link" href="https://docs.freebsd.org/en/books/handbook/bsdinstall/" target="_new" rel="noopener" data-start="3083" data-end="3137">https://docs.freebsd.org/en/books/handbook/bsdinstall/</a></p>
<h2 data-start="3734" data-end="3784">Installing FreeBSD (Desktop &amp; Virtual Machines)</h2>
<p data-start="3786" data-end="3876">FreeBSD can be installed on physical hardware or explored safely in a virtual environment.</p>
<h3 data-start="3878" data-end="3902">Desktop Environments</h3>
<p data-start="3904" data-end="4023">If you’re interested in using FreeBSD as a desktop system, this Foundation resource walks through common setup options:</p>
<p data-start="4025" data-end="4158"><strong data-start="4025" data-end="4072">Installing a Desktop Environment on FreeBSD</strong><br data-start="4072" data-end="4075" /><br />
<a class="decorated-link" href="https://freebsdfoundation.org/resource/installing-a-desktop-environment-on-freebsd/" target="_new" rel="noopener" data-start="4075" data-end="4158">https://freebsdfoundation.org/resource/installing-a-desktop-environment-on-freebsd/</a></p>
<p>In addition to written guides, several FreeBSD contributors have shared walkthroughs demonstrating desktop setup and usability, including videos referenced in the FreeBSD Foundation Executive Director’s laptop installation series.</p>
<h3 data-start="4320" data-end="4368">Virtual Machines (Recommended for Beginners)</h3>
<p data-start="4370" data-end="4449">Running FreeBSD in a virtual machine is one of the easiest ways to get started.</p>
<p data-start="4451" data-end="4537">If you’re using VirtualBox or another VM tool, this resource is a helpful entry point:</p>
<p data-start="4539" data-end="4675"><strong data-start="4539" data-end="4598">Installing FreeBSD with VirtualBox | FreeBSD Foundation</strong><br data-start="4598" data-end="4601" /><br />
<a class="decorated-link" href="https://freebsdfoundation.org/resource/installing-freebsd-with-virtualbox/" target="_new" rel="noopener" data-start="4601" data-end="4675">https://freebsdfoundation.org/resource/installing-freebsd-with-virtualbox/</a></p>
<h2 data-start="4790" data-end="4817">Learn with the Community</h2>
<p data-start="4819" data-end="4918">FreeBSD has an active, long-standing community. Participation is welcome at every experience level.</p>
<p data-start="4920" data-end="4945">Community spaces include:</p>
<ul data-start="4946" data-end="5098">
<li data-start="4946" data-end="4993">
<p data-start="4948" data-end="4993">FreeBSD Forums: <a class="decorated-link" href="https://forums.freebsd.org/" target="_new" rel="noopener" data-start="4964" data-end="4991">https://forums.freebsd.org/</a></p>
</li>
<li data-start="4994" data-end="5050">
<p data-start="4996" data-end="5050">FreeBSD Subreddit: <a class="decorated-link" href="https://www.reddit.com/r/freebsd/" target="_new" rel="noopener" data-start="5015" data-end="5048">https://www.reddit.com/r/freebsd/</a></p>
</li>
<li data-start="5051" data-end="5098">
<p data-start="5053" data-end="5098">FreeBSD Discord: <a class="decorated-link" href="https://discord.gg/freebsd" target="_new" rel="noopener" data-start="5070" data-end="5096">https://discord.gg/freebsd</a></p>
</li>
<li data-start="5051" data-end="5098">FreeBSD LinkedIn: <a href="https://www.linkedin.com/company/freebsd-foundation">https://www.linkedin.com/company/freebsd-foundation</a></li>
</ul>
<p data-start="4153" data-end="4229">Additional community resources commonly recommended by contributors include:</p>
<ul data-start="4230" data-end="4330">
<li data-start="4230" data-end="4287">
<p data-start="4232" data-end="4287">BSD Now (news and discussion): <a class="decorated-link" href="https://www.bsdnow.tv/" target="_new" rel="noopener" data-start="4263" data-end="4285">https://www.bsdnow.tv/</a></p>
</li>
<li data-start="4288" data-end="4330">
<p data-start="4290" data-end="4330">Mailing lists <a href="https://www.freebsd.org/community/mailinglists/">Mailing Lists | The FreeBSD Project </a></p>
</li>
<li data-start="4288" data-end="4330"><a href="https://www.freebsd.org/community/">Community | The FreeBSD Project</a></li>
</ul>
<p data-start="4332" data-end="4436">These spaces are useful for asking questions, sharing knowledge, and learning from real-world use cases. </p>
<h2 data-start="3233" data-end="3270">Books Recommended by the Community</h2>
<p data-start="3272" data-end="3339">Some users prefer learning with a book alongside hands-on practice.</p>
<ul data-start="3341" data-end="3630">
<li data-start="3341" data-end="3493">
<p data-start="3343" data-end="3493"><strong data-start="3343" data-end="3363">Absolute FreeBSD</strong> — by <strong data-start="3369" data-end="3410"><span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"><span class="whitespace-normal">Michael W. Lucas </span></span></strong><br data-start="3410" data-end="3413" /><br />
A system-administration focused guide that explains how and why FreeBSD works.  <strong>(<a href="https://www.amazon.com/dp/B0776JKXNR">Amazon</a>, <a href="https://www.kobo.com/us/en/ebook/absolute-freebsd-3rd-edition">Kobo</a>, <a href="https://bookshop.org/p/books/absolute-freebsd-3rd-edition-the-complete-guide-to-freebsd-michael-w-lucas/139cb9bab32fb73d?ean=9781593278922">BookShop.org</a>, <a href="https://books.google.com/books/about/Absolute_FreeBSD_3rd_Edition.html?id=CDY9DwAAQBAJ">Google Books</a>)</strong></p>
</li>
<li data-start="3495" data-end="3630">
<p data-start="3497" data-end="3630"><strong data-start="3497" data-end="3562">The Design and Implementation of the FreeBSD Operating System</strong> &#8211; by <span class="author notFaded" data-width="180">Marshall McKusick<span class="contribution"><span class="a-color-secondary">, </span></span></span><span class="author notFaded" data-width="187">George Neville-Neil,<span class="contribution"><span class="a-color-secondary"> </span></span></span><span class="author notFaded" data-width="155">Robert Watson </span><br data-start="3562" data-end="3565" /><br />
A deeper look at FreeBSD internals and operating system design. <strong>(<a href="https://www.amazon.com/dp/B00O56CFEE">Amazon</a>, <a href="https://www.kobo.com/us/en/ebook/design-and-implementation-of-the-freebsd-operating-system-the-3">Kobo</a>, <a href="https://bookshop.org/p/books/the-design-and-implementation-of-the-freebsd-operating-system-george-neville-neil/6c5a5dcfd94a5767?ean=9780321968975">BookShop.org</a>, <a href="https://books.google.com/books/about/The_Design_and_Implementation_of_the_Fre.html?id=KfCuBAAAQBAJ">Google Books</a>)</strong></p>
</li>
</ul>
<p data-start="3632" data-end="3727">These are optional resources but commonly recommended once you’re comfortable with the basics.</p>
<h2 data-start="5567" data-end="5584">Videos &amp; Talks</h2>
<p data-start="5586" data-end="5699">If you prefer video-based learning, the FreeBSD Foundation publishes talks and walkthroughs covering topics such as:</p>
<ul data-start="5700" data-end="5792">
<li data-start="5700" data-end="5723">
<p data-start="5702" data-end="5723">Installation guides</p>
</li>
<li data-start="5724" data-end="5759">
<p data-start="5726" data-end="5759">FreeBSD on laptops and desktops</p>
</li>
<li data-start="5760" data-end="5792">
<p data-start="5762" data-end="5792">System internals and tooling</p>
</li>
</ul>
<p data-start="5794" data-end="5863"><strong data-start="5794" data-end="5821">FreeBSD YouTube Channel</strong><br data-start="5821" data-end="5824" /><br />
<a class="decorated-link" href="https://www.youtube.com/@FreeBSDProject" target="_new" rel="noopener" data-start="5824" data-end="5863">https://www.youtube.com/@FreeBSDProject</a></p>
<p data-start="5870" data-end="6024">The FreeBSD Foundation’s Executive Director, <strong data-start="929" data-end="970"><span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"><span class="whitespace-normal">Deb Goodkin</span></span></strong>, has also been documenting her experience running FreeBSD on a laptop as part of an ongoing series. The posts share practical insights from installing FreeBSD, configuring a desktop environment, and using the system for everyday work, including references to documentation, videos, and community resources that may be helpful to new users.</p>
<table style="border-collapse: collapse; width: 82.6975%; height: 666px;">
<tbody>
<tr>
<td style="width: 60.4178%;"><iframe title="Embedded post" src="https://www.linkedin.com/embed/feed/update/urn:li:share:7413336041924947969?collapsed=1" width="504" height="670" frameborder="0" allowfullscreen="allowfullscreen"></iframe></td>
<td style="width: 21.4543%;">
<p><iframe title="Embedded post" src="https://www.linkedin.com/embed/feed/update/urn:li:share:7413723869695635457?collapsed=1" width="535" height="670" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
</td>
</tr>
</tbody>
</table>
<h2 data-start="5215" data-end="5237">Want to Contribute?</h2>
<p data-start="5239" data-end="5322">There are many ways to contribute to FreeBSD, and writing code is only one of them.</p>
<p data-start="5324" data-end="5358">Common contribution paths include:</p>
<ul data-start="5359" data-end="5476">
<li data-start="5359" data-end="5389">
<p data-start="5361" data-end="5389">Testing and reporting bugs</p>
</li>
<li data-start="5390" data-end="5417">
<p data-start="5392" data-end="5417">Improving documentation</p>
</li>
<li data-start="5418" data-end="5441">
<p data-start="5420" data-end="5441">Helping other users</p>
</li>
<li data-start="5442" data-end="5476">
<p data-start="5444" data-end="5476">Advocacy and community support</p>
</li>
</ul>
<p data-start="5478" data-end="5560"><strong data-start="5478" data-end="5510">How to Contribute to FreeBSD</strong></p>
<p data-start="5478" data-end="5560"><a href="https://docs.freebsd.org/en/articles/contributing/">Contributing to FreeBSD | FreeBSD Documentation Portal</a></p>
<p data-start="5478" data-end="5560">FreeBSD is a large project, and everyone starts somewhere. Take your time, explore what interests you, and use the resources that fit your learning style.</p>
<p data-start="5478" data-end="5560"> </p>
<p data-start="5478" data-end="5560">Interested in more resources? Visit our <a href="https://freebsdfoundation.org/freebsd-project/resources/">Resources page</a> to explore additional FreeBSD Foundation and Project materials.</p>
</section><p>The post <a href="https://freebsdfoundation.org/resource/getting-started-with-freebsd/">Getting Started with FreeBSD</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install FreeBSD on VMware</title>
		<link>https://freebsdfoundation.org/resource/how-to-install-freebsd-on-vmware/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Mon, 22 Jul 2024 17:12:26 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=16056</guid>

					<description><![CDATA[<p> 1. Installing VMware Fusion: VMware’s desktop products, recently made available by Broadcom as a free download for personal use, run on a wide range of systems; VMware Fusion is designed for Mac systems and can run on M-Series Apple Silicon systems, whereas VMware Workstation is a similar hypervisor that runs on Windows and Linux. Users [&#8230;]</p>
<p>The post <a href="https://freebsdfoundation.org/resource/how-to-install-freebsd-on-vmware/">How to Install FreeBSD on VMware</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor">
<h2><b> 1. Installing VMware Fusion:</b></h2>
<p><span style="font-weight: 400;">VMware’s desktop products, recently made available by Broadcom </span><a href="https://blogs.vmware.com/teamfusion/2024/05/fusion-pro-now-available-free-for-personal-use.html"><span style="font-weight: 400;">as a free download for personal use</span></a><span style="font-weight: 400;">, run on a wide range of systems; VMware Fusion is designed for Mac systems and can run on M-Series Apple Silicon systems, whereas VMware Workstation is a similar hypervisor that runs on Windows and Linux.</span></p>
<p><img fetchpriority="high" decoding="async" class=" wp-image-16057 aligncenter" src="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-1.png" alt="" width="632" height="216" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-1.png 512w, https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-1-300x103.png 300w" sizes="(max-width: 632px) 100vw, 632px" /></p>
<p><span style="font-weight: 400;">Users must first register on the Broadcom support portal to install VMware Fusion or VMware Workstation. This signup process includes being included in Broadcom&#8217;s marketing lists, and free access to the hypervisors is granted for personal use.</span></p>
<p><span style="font-weight: 400;">Once registered, </span><a href="https://www.vmware.com/products/desktop-hypervisor.html"><span style="font-weight: 400;">follow the install links on VMware’s website</span></a><span style="font-weight: 400;">, log in using your Broadcom sign-in, and install the correct hypervisor for your system. </span></p>
<p>&nbsp;</p>
<h2><b>2. Getting the latest FreeBSD release:</b></h2>
<p><span style="font-weight: 400;">Visit the official </span><a href="https://www.freebsd.org/where.html"><b>FreeBSD releases page</b></a><span style="font-weight: 400;">. The disk images are listed </span><i><span style="font-weight: 400;">in order of release date</span></i><span style="font-weight: 400;">, so the most recent release can be found at the top of the page as highlighted.</span></p>
<ul>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Newer m1/m2 Apple chips will require aarch64 images</span></li>
</ul>
<ul>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">64-bit Windows machines will require amd64 images</span></li>
</ul>
<p><img decoding="async" class=" wp-image-16059 aligncenter" src="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-3.png" alt="" width="619" height="202" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-3.png 512w, https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-3-300x98.png 300w" sizes="(max-width: 619px) 100vw, 619px" /> </p>
<p><span style="font-weight: 400;">After clicking the link, you will be redirected to a file directory containing multiple formats and versions of the FreeBSD installer.</span></p>
<h4><b>Identifying the Correct Disk Image</b></h4>
<p><img decoding="async" class=" wp-image-16058 aligncenter" src="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-2.png" alt="" width="599" height="193" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-2.png 512w, https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-2-300x97.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></p>
<p><span style="font-weight: 400;">For VMware, the correct format will be the image ending in <code>-disc.iso</code>, as shown above. Click this file and start downloading the image</span></p>
<p>&nbsp;</p>
<h2><b>3. Creating a FreeBSD Virtual Machine:</b></h2>
<h3><b>3.1 VMware Fusion (Mac):</b></h3>
<p><span style="font-weight: 400;">In VMware Fusion, click the ‘+’ symbol in the top left or center of the client, then click ‘New’ to create a new virtual machine. On Mac, choose ‘Create a custom virtual machine,’ select ‘Other’ as the Operating System, and ‘FreeBSD 14 64-bit’ as the firmware.</span></p>
<p><img loading="lazy" decoding="async" class=" wp-image-16060 aligncenter" src="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-5.png" alt="" width="552" height="166" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-5.png 512w, https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-5-300x90.png 300w" sizes="(max-width: 552px) 100vw, 552px" /></p>
<p><span style="font-weight: 400;">Select ‘Create a new virtual disk’ and ‘Continue.’ Then, finish and save the VM using your own naming convention.</span></p>
<p><span style="font-weight: 400;">Before booting, the new virtual machine must be given a CD drive to boot from, or it will fail to boot. Open it to see this message, and do not suspend it; it must be running to attach a drive.</span></p>
<p><span style="font-weight: 400;">Press command+E to open virtual machine settings and click CD/DVD. Choose the FreeBSD ISO image, the “<code>FreeBSD … disc1.iso</code>” image downloaded earlier. Then, check the box to connect a CD/DVD drive.</span></p>
<p><span style="font-weight: 400;">Right-click “virtual machine” in the top menu, and select “restart.”</span></p>
<h3><b>3.2 VMware Workstation (Windows/Linux:</b></h3>
<p><span style="font-weight: 400;">In the center of the client, click ‘Create a New Virtual Machine’ and choose the ‘Typical’ virtual machine option. </span><span style="font-weight: 400;">Choose the FreeBSD ISO image, the “<code>FreeBSD … disc1.iso</code>” image downloaded earlier.</span></p>
<p><img loading="lazy" decoding="async" class=" wp-image-16062 aligncenter" src="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-7.png" alt="" width="332" height="331" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-7.png 424w, https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-7-300x300.png 300w, https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-7-150x150.png 150w" sizes="(max-width: 332px) 100vw, 332px" /></p>
<p><span style="font-weight: 400;">Name the virtual machine using your own naming convention, and ‘Finish’ to create the VM. </span></p>
<p>&nbsp;</p>
<h2><b>4. Booting into FreeBSD:</b></h2>
<p><span style="font-weight: 400;">The FreeBSD booting system will automatically start once VirtualBox starts the virtual machine. Follow the </span><a href="https://www.freebsd.org/doc/handbook/using-bsdinstall.html"><b>FreeBSD Handbook’s installation guide</b></a><span style="font-weight: 400;"> to configure and set up your system. </span><span style="font-weight: 400;">When in doubt, use the default options provided</span><span style="font-weight: 400;">, which can be reconfigured later.</span></p>
<p><span style="font-weight: 400;">Once installation is complete, use the FreeBSD Handbook’s </span><a href="https://www.freebsd.org/doc/handbook/bsdinstall-post.html"><b>post-installation guide.</b></a></p>
<p><img loading="lazy" decoding="async" class="wp-image-16063 aligncenter" src="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-8.png" alt="" width="564" height="339" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-8.png 512w, https://freebsdfoundation.org/wp-content/uploads/2024/07/unnamed-8-300x180.png 300w" sizes="(max-width: 564px) 100vw, 564px" /></p>
<p>&nbsp;</p>
<h2><b>5. Finishing Up:</b></h2>
<p><span style="font-weight: 400;">On a bare-metal system, you would now be able to boot directly into FreeBSD with no further configuration. However, since we’re using a virtual machine, a few more steps are required.</span></p>
<p><span style="font-weight: 400;">Open settings. Click on CD/DVD, and then Un-check the box that says “connect CD/DVD Drive&#8221; or “connect on boot”. Exit out of this screen. </span><span style="font-weight: 400;"><br />
</span><span style="font-weight: 400;"><br />
</span><span style="font-weight: 400;">Next, click on Processors and Memory and select more RAM and cores. The default options are quite low for a dedicated virtual machine.</span></p>
<p><span style="font-weight: 400;">Use the Start button to boot the virtual machine, and log in to the root user (or use ‘<code>su</code>’ if the guest user was given admin control)</span><span style="font-weight: 400;"><br />
</span><span style="font-weight: 400;"><br />
</span><span style="font-weight: 400;">To ensure full VMware support, install the <code>open-vm-tools</code> package with:</span></p>
<p><code><span style="font-weight: 400;">pkg install -y open-vm-tools</span></code></p>
<p><span style="font-weight: 400;">If this is the first time<code> pkg</code> has been run, respond to the prompt with y to bootstrap <code>pkg</code>. The <code>open-vm-tools</code> package contains the core user space utilities, application programs, and libraries, including vmtoolsd, to help effectively manage communication between your host and guest OSs.</span></p>
<p>&nbsp;</p>
</section><p>The post <a href="https://freebsdfoundation.org/resource/how-to-install-freebsd-on-vmware/">How to Install FreeBSD on VMware</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to use VS Code on FreeBSD</title>
		<link>https://freebsdfoundation.org/resource/how-to-use-vs-code-on-freebsd/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Fri, 10 May 2024 16:00:38 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=14846</guid>

					<description><![CDATA[<p>Visual Studio Code (VS Code) is a source-code editor developed by Microsoft for Windows, Linux, and macOS. Through the extensive work of the FreeBSD community, it has also been ported to FreeBSD and can be installed through binary packages. Setting up VS Code is simple and quick, and can be done from a fresh FreeBSD [&#8230;]</p>
<p>The post <a href="https://freebsdfoundation.org/resource/how-to-use-vs-code-on-freebsd/">How to use VS Code on FreeBSD</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor"><p></section><section class="block block-core-paragraph"></p>
<p>Visual Studio Code (VS Code) is a source-code editor developed by Microsoft for Windows, Linux, and macOS. Through the extensive work of the FreeBSD community, it has also been ported to FreeBSD and can be installed through binary packages. Setting up VS Code is simple and quick, and can be done from a fresh FreeBSD install.</p>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="alignright size-full is-resized"><img loading="lazy" decoding="async" class="wp-image-14841 alignright" src="https://freebsdfoundation.org/wp-content/uploads/2024/05/vscode-logo.png" alt="" width="197" height="197" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/05/vscode-logo.png 360w, https://freebsdfoundation.org/wp-content/uploads/2024/05/vscode-logo-300x300.png 300w, https://freebsdfoundation.org/wp-content/uploads/2024/05/vscode-logo-150x150.png 150w" sizes="(max-width: 197px) 100vw, 197px" /></figure>
<p></section></div>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading"><strong>Requirements:</strong></h4>
<h4></section>
<section class="block block-core-list"></h4>
<ul class="wp-block-list"><section class="block block-core-list-item">
	<li>
<p>FreeBSD running on amd64 architecture</p>
</li>
</section>
<section class="block block-core-list-item">
	<li>
<p>A desktop environment (<a href="https://freebsdfoundation.org/resource/installing-a-desktop-environment-on-freebsd/">Refer to this guide to set up XFCE on your system</a>)</p>
</li>
</section></ul>
<p></section>
<section class="block block-core-heading"></p>
<p>&nbsp;</p>
<h2 class="wp-block-heading"><strong>Installation and Configuration:</strong></h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Install the VS Code binary package:</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p class="has-black-color has-text-color has-link-color wp-elements-df0f7fbb3c617d84ded29c1db5127939"><code>$ su</code></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><code># pkg install vscode</code></p>
<p></section>
<section class="block block-uagb-inline-notice"></p>
<div class="wp-block-uagb-inline-notice uagb-inline_notice__align-left uagb-block-37ee6d57"><button class="uagb-notice-close-button" type="button" aria-label="Close"></button>
<p class="uagb-notice-title">Note: As of this guide being written, Electron is blacklisted from the package builder. As this is a dependency of the vscode package, this may mean you will have to build VS Code from the ports collection:</p>
<div class="uagb-notice-text"><code># pkg install git<br />
# git clone https://git.FreeBSD.org/ports.git /usr/ports<br />
# git -C /usr/ports pull<br />
# cd /usr/ports/editors/vscode<br />
# make install clean</code></div>
</div>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Exit the su root shell:</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><code># exit</code></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>VS Code can be run directly from the terminal:</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><code>$ vscode</code></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Additional language extensions can be installed directly through the VS Code application. Browse the available options through the “Extensions” button on the left of the client.</p>
<p></section>
<section class="block block-uagb-inline-notice"></p>
<div class="wp-block-uagb-inline-notice uagb-inline_notice__align-left uagb-block-fa45ad1b"><button class="uagb-notice-close-button" type="button" aria-label="Close"></button>
<p class="uagb-notice-title">Note: Check the file locations where VS Code is configured to find them. rust-analyzer, for instance, will give an error because the VS Code extension searches a different file than where it is stored on FreeBSD. To quickly fix this issue:</p>
<div class="uagb-notice-text"><code>$ whereis rust-analyzer <br />
rust-analyzer: /usr/local/bin/rust-analyzer</code><br />
<br />
Navigate to the VSCode settings gear in the bottom left and open the .json settings file.<br />
<img decoding="async" src="https://lh7-us.googleusercontent.com/CfAZ7jPnzTgZJR-_Kk0uRuycWRxmcrGqw4xm7yH0cDNQIbH2D3s_rqNP5zA8Dlonf_MH-6zEz-54W9zZHBBl4Ya6pp1n8aq4uabjPzwyhUNG2SaDsK_U6haI0X9X_1YUaEsWqUTIHAXAVjJb_46_4A" alt="" /><br />
<br />
Add the correct path to the rust binary:<br />
&#8220;rust-analyzer.server.path&#8221;: &#8220;/usr/local/bin/rust-analyzer&#8221;<br />
<img decoding="async" src="https://lh7-us.googleusercontent.com/N5I-l5c5FPw_pNT9eufWe6zqAm-xox-95e14pYawGlVkuYoOK1-ZrMf6Jl7YOrMlC5xjevyfyYKkNSENY_tb1YnfUAgnvrz1QE7uF3Kc52YpmCRmqFq6GP0oCC7Ju8eLuMfogMxZdbRNkg9kPqkasA" alt="" /></div>
</div>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading"><strong>Using VS Code:</strong></h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Let’s use VS Code to create a simple “hello world” script using Python:</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Start by creating and opening a folder, either using the dropdown menu under ‘File’ or on the welcome page. Click “Create Folder” at the top right of the client. We’ll store the text files we create here. Once opened, VS Code will show the empty folder in the “Explorer” section.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Create a new file in this folder, VS Code will ask for either a file type or file name. In this example, I named it PythonTest.py. </p>
<p></section>
<section class="block block-core-image"></p>
<p><img loading="lazy" decoding="async" class="alignnone  wp-image-14850" src="https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-095622.png" alt="" width="995" height="144" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-095622.png 594w, https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-095622-300x43.png 300w" sizes="(max-width: 995px) 100vw, 995px" /></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>VS Code will correctly identify the file as Python, but further support will be needed to provide IntelliSense (code auto-completion and quick info), formatting, and debugging.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Navigate to the ‘Extensions’ tab on the left of the client, and install the ‘Python’ language support extension.</p>
<p></section>
<section class="block block-core-image"></p>
<p><img loading="lazy" decoding="async" class="alignnone  wp-image-14849" src="https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-100003.png" alt="" width="1004" height="363" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-100003.png 838w, https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-100003-300x108.png 300w" sizes="(max-width: 1004px) 100vw, 1004px" /></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Now when we try to type a simple print command in the Python file we created, VS Code will autocomplete and show error messages</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Type a simple hello world command:</p>
<p></section>
<section class="block block-core-image"></p>
<p><img loading="lazy" decoding="async" class="alignnone  wp-image-14851" src="https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-101709.png" alt="" width="1004" height="199" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-101709.png 560w, https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-101709-300x59.png 300w" sizes="(max-width: 1004px) 100vw, 1004px" /></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Save your changes under ‘File’.</p>
<p></section>
<section class="block block-uagb-inline-notice"></p>
<div class="wp-block-uagb-inline-notice uagb-inline_notice__align-left uagb-block-d1dd1418"><button class="uagb-notice-close-button" type="button" aria-label="Close"></button>
<p class="uagb-notice-title">Tip: Enable ‘Auto Save’ so you don’t have to manually save each time changes are made.</p>
</div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>&nbsp;</p>
<p>Then, run and debug the file. Either by pressing ‘F5’ or selecting ‘Run Python File’ at the top right of the client.</p>
<p></section>
<section class="block block-core-image"></p>
<p><img loading="lazy" decoding="async" class="alignnone  wp-image-14852" src="https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-101348.png" alt="" width="1011" height="320" srcset="https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-101348.png 708w, https://freebsdfoundation.org/wp-content/uploads/2024/05/Screenshot-2024-04-22-101348-300x95.png 300w" sizes="(max-width: 1011px) 100vw, 1011px" /></p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading"><strong>Troubleshooting VS Code:</strong></h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>While this guide aims to be as broad as possible, users may still run into issues when installing the vscode package. There&#8217;s a wide range of possible errors, from unsupported packages to known bugs to unsupported hardware.</p>
<p></section>
<section class="block block-uagb-inline-notice"></p>
<div class="wp-block-uagb-inline-notice uagb-inline_notice__align-left uagb-block-5ed2f9eb"><button class="uagb-notice-close-button" type="button" aria-label="Close"></button>
<p class="uagb-notice-title">Note: The vscode port is currently only supported for the amd64 architecture; if you run into an error mentioning unsupported architecture, confirm that the system is amd64:</p>
<div class="uagb-notice-text"><code>$ uname -a</code></div>
</div>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>1. Search the <a href="https://bugs.freebsd.org/bugzilla/query.cgi?format=advanced">Problem Report (PR) database</a> for known fixes pending implementation. This is also useful to find existing bugs that other users have encountered.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>2. If none of the above works, contact the port maintainer directly. Port maintainers are listed at the top of the <a href="https://www.freshports.org/editors/vscode/">FreshPorts page</a>. An easy way to get visibility on an issue is to post to the <a href="https://lists.freebsd.org/subscription/freebsd-ports">freebsd-ports mailing list</a> and CC the maintainer. Ask if they know of any issues and include the output before the error. </p>
<p></section><section class="block block-classic-editor"></p></section><p>The post <a href="https://freebsdfoundation.org/resource/how-to-use-vs-code-on-freebsd/">How to use VS Code on FreeBSD</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>An Introduction to Dynamic Tracing</title>
		<link>https://freebsdfoundation.org/resource/an-introduction-to-dynamic-tracing/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Sun, 10 Dec 2023 15:16:31 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=13494</guid>

					<description><![CDATA[<p>DTrace, or Dynamic Tracing, is a performance analysis and troubleshooting tool included by default with FreeBSD. DTrace can help locate performance bottlenecks in production systems and can be used to patch live running instructions. In addition to diagnosing performance problems, DTrace can help investigate and debug unexpected behavior in both the FreeBSD kernel and userland [&#8230;]</p>
<p>The post <a href="https://freebsdfoundation.org/resource/an-introduction-to-dynamic-tracing/">An Introduction to Dynamic Tracing</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor">
<div class="sect1">
<p>DTrace, or Dynamic Tracing, is a performance analysis and troubleshooting tool included by default with FreeBSD. DTrace can help locate performance bottlenecks in production systems and can be used to patch live running instructions. In addition to diagnosing performance problems, DTrace can help investigate and debug unexpected behavior in both the FreeBSD kernel and userland programs.</p>
<div class="sectionbody">
<div class="paragraph">
<p>DTrace provides its own language (D Language) to help users author utilities that are customized to specific needs. While this introductory guide won&#8217;t cover writing scripts in D, more detailed information can be <a href="https://illumos.org/books/dtrace/preface.html#preface">found here.</a></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="dtrace-enable">Enabling DTrace Support</h2>
</div>
<p>To start, all necessary modules will need to be loaded with:</p>
<p><code># kldload dtraceall</code></p>
<p>The DTrace Toolkit has several utilities written in <code>ksh</code>, so support for the Korn shell to fully utilize the system will be needed. </p>
<p><code># pkg install ksh93</code></p>
<div class="sect1">
<div class="sectionbody">
<div class="paragraph">
<p>The toolkit itself can be installed with:</p>
<p><code># pkg install dtrace-toolkit</code></p>
<p>This includes a variety of pre-made scripts for diagnosing system information. It&#8217;s important to note that not all of these scripts have been specifically ported to FreeBSD and may need manual configuration. Many of the toolkit scripts are written in the D Language, which is similar to C++.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="dtrace-using">Monitoring DTrace </h2>
<p>DTrace utilizes probes, which are instrumentation points for capturing event data. Each probe is associated with its own action. Whenever the condition for a probe is met, the associated action is executed. Possible actions include logging information and modifying context variables. </p>
<div class="sectionbody">
<div class="paragraph">
<p>To check if DTrace was successfully loaded, and to list all active probes, execute the following: </p>
</div>
<div class="listingblock">
<div class="content">
<p class="rouge highlight"><code data-lang="shell"><span class="c"># dtrace -l | more</span></code></p>
</div>
</div>
<div class="paragraph">
<p>This will list each probe as well as the ID, Provider, module, and function name.</p>
<p><code># dtrace -l | wc -l</code></p>
<p>This command will list the number of available probes, helpful for monitoring what probes can be enabled on each system.</p>
</div>
<div class="paragraph">
<p>For more information on probe identifiers, refer to <a href="https://man.freebsd.org/cgi/man.cgi?query=dtrace&amp;sektion=1&amp;format=html">dtrace(1)</a>.</p>
<h2 id="dtrace-using">Enabling Probes</h2>
</div>
</div>
</div>
<p>Probes can be enabled with the <code>dtrace</code> command, omitting the -l option from the previous section. For enabled probes, DTrace will perform the default action, indicating that the probe has been fired, but not collecting any further event data. </p>
<p>You can use the <code>dtrace:::BEGIN</code> probe to fire when DTrace starts:</p>
<p><code># dtrace -n dtrace:::BEGIN</code></p>
<p>Additionally, an action can be assigned to each probe. Actions enable DTrace to interact with the system outside of the DTrace framework. These actions range from recording data, stopping a current process, raising signals on a process, or stop tracing.</p>
<p><code># dtrace -n 'dtrace:::BEGIN { printf("Hello FreeBSD!\n"); }'</code></p>
<p>Use the<code> Ctrl+C key</code> combination to stop the process.</p>
<p>This modification on the previous command includes a specified action to display &#8220;Hello FreeBSD!&#8221; when DTrace starts.</p>
<p>An action can be assigned to each probe, allowing a massive amount of customization on what is monitored and the specific action DTrace executes when it is fired. Another possible use would be to set an action to the <code>syscall::open*:entry</code> to trace file opens as they happen.</p>
<h2 id="dtrace-using">Using DTrace Scripts</h2>
<div class="sect1">
<div class="sectionbody">
<div class="paragraph">
<p>Some pre-made DTrace scripts can be found in the DTrace toolkit. It&#8217;s a good idea to check if one already exists there before creating your own, though customization is still possible.</p>
</div>
<div class="paragraph">
<p>The <code><span class="filename">hotkernel</span></code> script is designed to identify which function is using the most kernel time. It will produce output similar to the following:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># cd /usr/local/share/dtrace-toolkit</span>
<span class="c"># ./hotkernel</span>
Sampling... Hit Ctrl-C to end.</code></pre>
<div class="copy-to-clipboard-wrapper">Upon termination, the script will display a list of kernel functions and timing information, sorting the output in increasing order of time:</div>
</div>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell">kernel<span class="sb">`</span>_thread_lock_flags                                   2   0.0%
0xc1097063                                                  2   0.0%
kernel<span class="sb">`</span>sched_userret                                        2   0.0%
kernel<span class="sb">`</span>kern_select                                          2   0.0%
kernel<span class="sb">`</span>generic_copyin                                       3   0.0%
kernel<span class="sb">`</span>_mtx_assert                                          3   0.0%
kernel<span class="sb">`</span>vm_fault                                             3   0.0%
kernel<span class="sb">`</span>sopoll_generic                                       3   0.0%
kernel<span class="sb">`</span>fixup_filename                                       4   0.0%
kernel<span class="sb">`</span>_isitmyx                                             4   0.0%
kernel<span class="sb">`</span>find_instance                                        4   0.0%
kernel<span class="sb">`</span>_mtx_unlock_flags                                    5   0.0%
kernel<span class="sb">`</span>syscall                                              5   0.0%
kernel<span class="sb">`</span>DELAY                                                5   0.0%
0xc108a253                                                  6   0.0%
kernel<span class="sb">`</span>witness_lock                                         7   0.0%
kernel<span class="sb">`</span>read_aux_data_no_wait                                7   0.0%
kernel<span class="sb">`</span>Xint0x80_syscall                                     7   0.0%
kernel<span class="sb">`</span>witness_checkorder                                   7   0.0%
kernel<span class="sb">`</span>sse2_pagezero                                        8   0.0%
kernel<span class="sb">`</span>strncmp                                              9   0.0%
kernel<span class="sb">`</span>spinlock_exit                                       10   0.0%
kernel<span class="sb">`</span>_mtx_lock_flags                                     11   0.0%
kernel<span class="sb">`</span>witness_unlock                                      15   0.0%
kernel<span class="sb">`</span>sched_idletd                                       137   0.3%
0xc10981a5                                              42139  99.3%</code></pre>
</div>
</div>
<div class="paragraph">
<p>This script will also work with kernel modules. To use this feature, run the script with <code>-m</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># ./hotkernel -m</span></code></pre>
</div>
</div>
<div class="paragraph">Other scripts can be run in a similar way, for a full list of pre-made DTrace scripts refer to the <a href="https://github.com/opendtrace/toolkit">dtrace-toolbox github repository</a>.</div>
</div>
<div> </div>
</div>
</section><p>The post <a href="https://freebsdfoundation.org/resource/an-introduction-to-dynamic-tracing/">An Introduction to Dynamic Tracing</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>An Introduction to Packet Filter (PF)</title>
		<link>https://freebsdfoundation.org/resource/an-introduction-to-packet-filter-pf/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Tue, 12 Sep 2023 19:35:40 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=12822</guid>

					<description><![CDATA[<p>Packet Filter, also known as PF or pf, is a BSD-licensed stateful packet filter used to filter TCP/IP traffic and perform Network Address Translation (NAT.) Originally created by OpenBSD, PF has been ported to FreeBSD since 5.3-RELEASE. PF can identify where a packet should be directed or if it should even be allowed through; this [&#8230;]</p>
<p>The post <a href="https://freebsdfoundation.org/resource/an-introduction-to-packet-filter-pf/">An Introduction to Packet Filter (PF)</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor">
<p>Packet Filter, also known as PF or pf, is a BSD-licensed stateful packet filter used to filter TCP/IP traffic and perform Network Address Translation (NAT.) Originally created by OpenBSD, PF has been ported to FreeBSD since 5.3-RELEASE.</p>
<p>PF can identify where a packet should be directed or if it should even be allowed through; this can be decided based on the source and destination of that individual packet. PF can detect and block traffic you want to keep out of or in the local network. The firewall is highly flexible and even offers bandwidth management and packet priority.</p>
<p><img loading="lazy" decoding="async" class="wp-image-12964  aligncenter" src="https://freebsdfoundation.org/wp-content/uploads/2023/09/Untitled-design-43-1024x1024.png" alt="" width="448" height="448" srcset="https://freebsdfoundation.org/wp-content/uploads/2023/09/Untitled-design-43-1024x1024.png 1024w, https://freebsdfoundation.org/wp-content/uploads/2023/09/Untitled-design-43-300x300.png 300w, https://freebsdfoundation.org/wp-content/uploads/2023/09/Untitled-design-43-150x150.png 150w, https://freebsdfoundation.org/wp-content/uploads/2023/09/Untitled-design-43-1536x1536.png 1536w, https://freebsdfoundation.org/wp-content/uploads/2023/09/Untitled-design-43-2048x2048.png 2048w" sizes="(max-width: 448px) 100vw, 448px" /></p>
<h2>1 . Enabling PF</h2>
<p>PF relies on its kernel module, this must be enabled through <code>/etc/rc.conf</code> to start PF:</p>
<p><code># sysrc pf_enable=yes<br />
</code><br />
Additional options can be enabled when PF is started, this can be done by adding the following line to <code>/etc/rc.conf.</code> Required flags can later be specified between the two quotes(&#8220;&#8221;):</p>
<p><code>pf_flags="" # additional flags for pfctl startup</code></p>
<p>To start, PF will need to find its ruleset configuration file. FreeBSD does not ship with a ruleset or /etc/pf.conf. Custom rulesets can be used by specifying the path in <code>/etc/rc.conf</code></p>
<p><code>pf_rules="/path/to/pf.conf"</code><br />
<em><br />
</em>Logging support for PF is provided by <code>pflog(4)</code>. To enable logging support, add <code>pflog_enable=yes</code> to <code>/etc/rc.conf</code>:</p>
<p><code># sysrc pflog_enable=yes</code></p>
<p>The following lines can also be added to change the default location of the log file or to specify any additional flags to pass to pflog(4) when it is started:</p>
<p><code>pflog_logfile="/var/log/pflog" # where pflogd should store the logfile</code><br />
<code>pflog_flags="" # additional flags for pflogd startup</code></p>
<p>The following option will enable NAT if there is a LAN behind the firewall:</p>
<p><code>gateway_enable="YES"</code></p>
<p>PF can now be started with logging support:</p>
<p><code># service pf start</code><br />
<code># service pflog start</code></p>
<p>&nbsp;</p>
<h2>2. Using pfctl</h2>
<p>PF can be controlled using pfctl, refer to pfctl(8) for a description of all available options. Here are some of the more common pfctl options:</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><code>pfctl -e</code></td>
<td style="width: 50%; height: 24px;">Enable PF.</td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><code>pfctl -d</code></td>
<td style="width: 50%; height: 24px;">Disable PF.</td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><code>pfctl -F all -f /etc/pf.conf</code></td>
<td style="width: 50%; height: 24px;">Flush all NAT, filter, state, and table rules and reload <code>/etc/pf.conf.</code></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><code>pfctl -s [ rules | nat | states ]</code></td>
<td style="width: 50%; height: 24px;">Report on the filter rules, NAT rules, or state table.</td>
</tr>
<tr style="height: 23px;">
<td style="width: 50%; height: 23px;"><code>pfctl -vnf /etc/pf.conf</code></td>
<td style="width: 50%; height: 23px;">Checks <code>/etc/pf.conf</code> for errors, but does not load ruleset.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<h2>3. Creating a Base PF Ruleset</h2>
<p>PF depends on a ruleset, which can be customized to best serve any system. Creating a base ruleset is the first step in customizing your firewall that can be further augmented and specified. Create the ruleset in</p>
<p>Start by creating a simple ruleset that applies to only a single machine, relies on one network, and does not run services:</p>
<div class="literalblock programlisting">
<div class="content">
<p><code>block in all</code></p>
<p><code>pass out all keep state</code></p>
</div>
</div>
<div class="paragraph">
<p>This rule will deny all incoming traffic, while the second rule allows connections created by this system to pass out while retaining state information on those connections. Load this new ruleset with the following:</p>
</div>
<div class="listingblock">
<div class="content">
<p class="rouge highlight"><code data-lang="shell"><span class="c"># pfctl -e ; pfctl -f /etc/pf.conf</span></code></p>
</div>
</div>
<div class="paragraph">
<p>In addition to keeping state, PF provides lists and macros that can be defined when creating rules. Macros can include lists and need to be defined before use. As an example, insert these lines at the very top of the ruleset:</p>
</div>
<div class="literalblock programlisting">
<div class="content">
<p><code>tcp_services = "{ ssh, smtp, domain, www, pop3, auth, pop3s }"</code></p>
<p><code>udp_services = "{ domain }"</code></p>
</div>
</div>
<div class="paragraph">
<p>PF can use port names and numbers if the names are listed in <code><span class="filename">/etc/services</span></code>. In this example, all traffic is blocked except for the connections initiated by this system for the seven specified TCP services and the one specified UDP service:</p>
</div>
<div class="literalblock programlisting">
<pre><code>tcp_services = "{ ssh, smtp, domain, www, pop3, auth, pop3s }"
udp_services = "{ domain }"
block all</code> <code>pass out proto tcp to any port $tcp_services keep state
pass proto udp to any port $udp_services keep state</code></pre>
<p>Next, at the top of your ruleset, create a set skip rule for the loopback device because it does not need to filter traffic and would likely bring your server to a crawl. </p>
<p class="content"><code>set skip on lo0</code></p>
<p class="content">Finally, add a <code>pass out inet</code> rule for the ICMP protocol, which allows you to use the ping(8) utility for troubleshooting</p>
<p class="content"><code>pass out inet proto icmp icmp-type { echoreq }</code></p>
<p class="content">The ruleset should now resemble the following: </p>
<pre><code>set skip on lo0
tcp_services = "{ ssh, smtp, domain, www, pop3, auth, pop3s }"
udp_services = "{ domain }"
block all</code><code>
pass out proto tcp to any port $tcp_services keep state
pass proto udp to any port $udp_services keep state
pass out inet proto icmp icmp-type { echoreq }</code></pre>
</div>
<div class="paragraph">
<p>After each edit, the ruleset needs to be loaded again:</p>
</div>
<div class="listingblock">
<div class="content">
<p class="rouge highlight"><code data-lang="shell"><span class="c"># pfctl -f /etc/pf.conf</span></code></p>
</div>
</div>
<div class="paragraph">
<p><code>pfctl</code> will not output any messages unless there are syntax errors that will need to be fixed. During the rule load, instead of loading the ruleset, a test can be run with:</p>
</div>
<div class="listingblock">
<div class="content">
<p class="rouge highlight"><code data-lang="shell"><span class="c"># pfctl -nf /etc/pf.conf</span></code></p>
<div class="copy-to-clipboard-wrapper">Including <code>-n</code> causes the rules to be interpreted only but not loaded. This provides an opportunity to correct any errors. The last valid ruleset loaded will be enforced until either PF is disabled or a new ruleset is loaded.</div>
</div>
</div>
<p>&nbsp;</p>
<h2>4. Testing Your Base Ruleset</h2>
<p>Testing your ruleset between major edits is crucial to ensure that PF functions properly. </p>
<p>First test for internet connectivity and DNS service:</p>
<p><code># ping -c 3 google.com</code></p>
<p>Check that the <code>pkgs</code> repository can be reached: </p>
<p><code># pkg upgrade</code></p>
<p>And finally, reboot:</p>
<p><code># reboot</code></p>
<p>Give your server a few minutes to reboot. Next, you will expand the ruleset with more advanced features to see some possible applications of the PF ruleset.</p>
<h2>5. Example Rulesets and Their Application</h2>
<p>Now that you have created a base ruleset, the base ruleset can be built upon for more advanced PF functions. While this guide won&#8217;t cover every possible function or customization, these basic rulesets may be helpful for your system, or offer insight into how PF may be used. After each example, make sure to test the base ruleset.</p>
<h3 style="padding-left: 40px;">5.1 Blocking Spoofed Packets</h3>
<p style="padding-left: 40px;">Address spoofing is a method where an outside user forges the source IP of sent packets to conceal the actual address, essentially impersonating another internet node. This opens the door for a network attack that does not disclose where it&#8217;s originating.</p>
<p style="padding-left: 40px;">The antispoof PF keyword can help protect against spoof packets:</p>
<p style="padding-left: 40px;"><code>antispoof [log] [quick] for interface [af]</code></p>
<p style="padding-left: 40px;"><code><strong>log</strong></code>: Specifies that packets matching the criteria should be reported by pflogd (8).<br />
<code><strong>quick</strong></code>: This ensured that if a packet meets this rules, examination of the ruleset will cease.<br />
<code><strong>interface</strong></code>: Specify the specific network where spoofing protection will be activated.<br />
<code><strong>af</strong></code>: Address family (i.e., inet or inet6 for IPv4 and IPv6)</p>
<p style="padding-left: 40px;">The most basic way to weed out spoofed traffic coming in from external sources, as well as any spoofed packets that originate in the local network:</p>
<p style="padding-left: 40px;"><code>antispoof for $ext_if</code><br />
<code>antispoof for $int_if</code></p>
<p style="padding-left: 40px;"> </p>
<h3 style="padding-left: 40px;">5.2 Protecting SSH Ports</h3>
<p style="padding-left: 40px;">A typical exploit is to target SSH ports, which are open to the public. This is often done with brute force attacks and can succeed if the server has weak passwords. PF has built-in features that help deal with brute-force attacks. PF can limit the simultaneous connection attempts a single host allows. Once a host exceeds this number, the connection will be dropped, and they will be banned from the server. PF&#8217;s overload mechanism has a table of banned IP addresses.</p>
<p style="padding-left: 40px;">Modify your previous base ruleset to limit simultaneous connections from a single host:</p>
<p style="padding-left: 40px;"><code>pass in on $vtnet0 proto tcp to port { 22 } \</code></p>
<p style="padding-left: 80px;"><code>keep state (max-src-conn 15, max-src-conn-rate 3/1, \</code></p>
<p style="padding-left: 120px;"><code>overload &lt;bruteforce&gt; flush global)</code></p>
<p style="padding-left: 40px;"><code><strong>keep state</strong></code>: Allows you to define the state criteria for the overload table. <br />
<code><strong>max-src-conn</strong>:</code> Specifies the number of simultaneous connections allowed from a single host per second.<br />
<code><strong>max-src-conn-rate</strong>:</code> Specifies the number of new connections allowed from a single host per second.</p>
<p style="padding-left: 40px;">If any host exceeds the specified limits, the PF overload mechanism will add the source IP to the <code>&lt;bruteforce&gt;</code> table. If a host exceeds these limits, the overload mechanism adds the source IP to the <code>&lt;bruteforce&gt;</code> table, which bans them from the server. The connection will immediately be dropped due to the flush global parameter. </p>
<p style="padding-left: 40px;">Before this ruleset can be loaded, the table you defined needs to be declared in the ruleset: </p>
<p style="padding-left: 40px;">Specify the <code>&lt;bruteforce&gt;</code> table underneath the previous <code>icmp_types</code> macro</p>
<p style="padding-left: 40px;"><code>icmp_types = "{ echoreq }"</code></p>
<p style="padding-left: 80px;"><code>table &lt;bruteforce&gt; persist</code></p>
<p style="padding-left: 40px;">The persist keyword allows an empty table to exist in the ruleset. Without it, PF will complain that there are no IP addresses in the table.</p>
<h3 style="padding-left: 40px;">5.3 Handling Non-Routable Addresses</h3>
<p style="padding-left: 40px;">As much as you can properly configure your system to be precise, some configuration may be needed to compensate for other people&#8217;s misconfigurations. One common mistake is to let traffic with non-routable addresses out to the Internet. Since non-routable addresses can be used in DoS attacks, consider blocking this traffic from entering the network.</p>
<p style="padding-left: 40px;">Define a macro containing non-routable addresses, then use it in blocking rules. Traffic to and from these addresses is dropped on the gateway’s external interface.</p>
<p style="padding-left: 40px;">
<code>external = "{ 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, \</code><br />
<code>      10.0.0.0/8, 169.254.0.0/16, 192.0.2.0/24, \</code><br />
<code>      0.0.0.0/8, 240.0.0.0/4 }"</code></p>
<p style="padding-left: 40px;"><code>block drop in quick on $ext_if from $external to any</code><br />
<code>block drop out quick on $ext_if from any to $external</code></p>
<p>
</p>
<h2>6. Viewing PF Logs</h2>
<p>To view PF logs:</p>
<p><code>tcpdump -n -e -ttt -r /var/log/pflog</code></p>
<p>To view logs in real-time from the pflog0 interface, run the following command:</p>
<p><code>tcpdump -n -e -ttt -i pflog0</code></p>
<p>The pftop utility is a tool for quickly viewing firewall activity in real-time; it can be installed and started with:</p>
<p><code>pkg install pftop</code></p>
<p><code>pftop</code></p>
</section><p>The post <a href="https://freebsdfoundation.org/resource/an-introduction-to-packet-filter-pf/">An Introduction to Packet Filter (PF)</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using FreeBSD as a Virtual Host &#8211; Quick Guide</title>
		<link>https://freebsdfoundation.org/resource/using-freebsd-as-a-virtual-host-quick-guide/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Tue, 30 May 2023 18:34:09 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=12280</guid>

					<description><![CDATA[<p>Installing VirtualBox™ Note: To run VirtualBox™, an Xorg session is needed. Refer to the handbook&#8217;s section on the X Window System to install and configure Xorg. VirtualBox™ is available as a FreeBSD package or port in emulators/virtualbox-ose. To quickly install the package:  # pkg install virtualbox-ose The kernel module vboxdrv will need to be loaded before [&#8230;]</p>
<p>The post <a href="https://freebsdfoundation.org/resource/using-freebsd-as-a-virtual-host-quick-guide/">Using FreeBSD as a Virtual Host – Quick Guide</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor">
<div class="sect2">
<h2><img loading="lazy" decoding="async" class=" wp-image-12411 aligncenter" src="https://freebsdfoundation.org/wp-content/uploads/2023/05/Untitled-design-32-1024x256.png" alt="" width="1048" height="262" srcset="https://freebsdfoundation.org/wp-content/uploads/2023/05/Untitled-design-32-1024x256.png 1024w, https://freebsdfoundation.org/wp-content/uploads/2023/05/Untitled-design-32-300x75.png 300w, https://freebsdfoundation.org/wp-content/uploads/2023/05/Untitled-design-32-1536x384.png 1536w, https://freebsdfoundation.org/wp-content/uploads/2023/05/Untitled-design-32-2048x512.png 2048w, https://freebsdfoundation.org/wp-content/uploads/2023/05/Untitled-design-32.png 1920w" sizes="(max-width: 1048px) 100vw, 1048px" /></h2>
<h2 id="virtualization-virtualbox-install">Installing VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /></h2>
</div>
<p><strong>Note: To run VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />, an Xorg session is needed. Refer to the handbook&#8217;s section on <a href="https://docs.freebsd.org/en/books/handbook/x11/#x-install">the X Window System</a> to install and configure Xorg.</strong></p>
<div class="sect2">
<div class="paragraph">
<p>VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> is available as a FreeBSD package or port in <a class="package" href="https://cgit.freebsd.org/ports/tree/emulators/virtualbox-ose/">emulators/virtualbox-ose</a>. To quickly install the package: </p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># pkg install virtualbox-ose</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>The kernel module <code>vboxdrv</code> will need to be loaded before VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> is started for the first time: </p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># kldload vboxdrv</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>To ensure the module is always loaded after a reboot, add this line to <code><span class="filename">/boot/loader.conf</span>:</code></p>
</div>
<div class="literalblock programlisting">
<div class="content">
<pre>vboxdrv_load="YES"</pre>
</div>
</div>
<div class="paragraph">
<p>To use the kernel modules that allow bridged or host-only networking, add this line to <code><span class="filename">/etc/rc.conf</span></code> and reboot the computer:</p>
</div>
<div class="literalblock programlisting">
<div class="content">
<pre>vboxnet_enable="YES"</pre>
</div>
</div>
<div class="paragraph">
<p>The <code>vboxusers</code> group is created during installation of VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />. All users that need access to VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> will have to be added as members of this group. <code>pw</code> can be used to add new members:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># pw groupmod vboxusers -m yourusername</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>The default permissions for <span class="filename">/dev/vboxnetctl</span> are restrictive and need to be changed for bridged networking. To permanently change these permissions, add these lines to <code><span class="filename">/etc/devfs.conf</span></code>:</p>
</div>
<div class="literalblock programlisting">
<div class="content">
<pre>own     vboxnetctl root:vboxusers
perm    vboxnetctl 0660</pre>
</div>
</div>
<div class="paragraph">
<p>To launch VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />, type from an Xorg session:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"># VirtualBox</code></pre>
</div>
<div class="copy-to-clipboard-wrapper"> </div>
</div>
</div>
<div class="sect2">
<h2 id="virtualization-virtualbox-usb-support">VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> USB Support</h2>
<div class="paragraph">
<p>Users will need to be members of the <code>operator</code> group For VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> to be aware of USB devices.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># pw groupmod operator -m yourusername</span></code></pre>
<div class="copy-to-clipboard-wrapper">Then, add the following to <span class="filename">/etc/devfs.rules</span>, or create this file if it does not exist yet:</div>
</div>
</div>
<div class="literalblock programlisting">
<div class="content">
<pre>[system=10]
add path 'usb/*' mode 0660 group operator</pre>
</div>
</div>
<div class="paragraph">
<p>To load these new rules, add the following to <span class="filename">/etc/rc.conf</span>:</p>
</div>
<div class="literalblock programlisting">
<div class="content">
<pre>devfs_system_ruleset="system"</pre>
</div>
</div>
<div class="paragraph">
<p>Then, restart devfs:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># service devfs restart</span></code></pre>
<div class="copy-to-clipboard-wrapper">Both the login session and VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> will need to be restarted for any changed to take effect.</div>
</div>
</div>
</div>
<div class="sect2">
<h2> </h2>
<h2 id="virtualization-virtualbox-host-dvd-cd-access">VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Host DVD/CD Access</h2>
<div class="paragraph">
<p>The HAL daemon needs to run for VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> DVD/CD functions to work, so enable it in <code><span class="filename">/etc/rc.conf</span></code> and start it if it is not already running:</p>
</div>
<div class="literalblock programlisting">
<div class="content">
<pre>hald_enable="YES"</pre>
</div>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># service hald start</span></code></pre>
<div class="copy-to-clipboard-wrapper">A variety of user permissions will need to be edited in order to access<code><span class="filename">/dev/xpt0</span></code>, <code><span class="filename">/dev/cdN</span></code>, and <code><span class="filename">/dev/passN</span></code>. This is usually achieved by making the user a member of <code>operator</code>. Permissions to these devices have to be corrected by adding these lines to <code><span class="filename">/etc/devfs.conf</span></code>:</div>
</div>
</div>
<div class="literalblock programlisting">
<div class="content">
<pre>perm cd* 0660
perm xpt0 0660
perm pass* 0660</pre>
</div>
</div>
<div class="listingblock">
<div class="content">
<p class="rouge highlight"><code data-lang="shell"><span class="c"># service devfs restart</span></code></p>
<p>This quick guide is intended to get VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> running on your FreeBSD device, however, the scope and scale of further configuration of your virtual machine would be unfit for a quick guide. The VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> handbook offers a massive amount of information on how to best use and set up your FreeBSD machine. While VirtualBox<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> can run on FreeBSD, it is not a supported host platform for the extension pack. Installation of the Pack will not extend the feature set</p>
</div>
</div>
</div>
</section><p>The post <a href="https://freebsdfoundation.org/resource/using-freebsd-as-a-virtual-host-quick-guide/">Using FreeBSD as a Virtual Host – Quick Guide</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>An Introduction to ZFS</title>
		<link>https://freebsdfoundation.org/resource/an-introduction-to-the-z-file-system/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Sun, 22 Jan 2023 15:20:05 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=11875</guid>

					<description><![CDATA[<p>ZFS combines the roles of volume manager and independent file system into one, giving multiple advantages over a stand-alone file system. It is renowned for speed, flexibility, and, most importantly, taking great care to prevent data loss.</p>
<p>The post <a href="https://freebsdfoundation.org/resource/an-introduction-to-the-z-file-system/">An Introduction to ZFS</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor"><p></section><section class="block block-core-paragraph"></p>
<p>ZFS combines the roles of volume manager and independent file system into one, giving multiple advantages over a stand-alone file system. It is renowned for speed, flexibility, and, most importantly, taking great care to prevent data loss. While many traditional file systems had to exist on a single disk at a time, ZFS is aware of the underlying structure of the disks and creates a pool of available storage, even on multiple disks. The existing file system will grow automatically when extra disks are added to the pool, immediately becoming available to the file system.</p>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" class="wp-image-11796 aligncenter" src="https://freebsdfoundation.org/wp-content/uploads/2022/10/OpenZFS_logo.svg-1024x933.png" alt="" width="215" height="196" srcset="https://freebsdfoundation.org/wp-content/uploads/2022/10/OpenZFS_logo.svg-1024x933.png 1024w, https://freebsdfoundation.org/wp-content/uploads/2022/10/OpenZFS_logo.svg-300x273.png 300w, https://freebsdfoundation.org/wp-content/uploads/2022/10/OpenZFS_logo.svg.png 1200w" sizes="(max-width: 215px) 100vw, 215px" /></figure>
<p></section></div>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading" id="zfs-quickstart">Getting Started</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>FreeBSD can mount ZFS pools and datasets during system initialization. To enable it, add this line to /etc/rc.conf:</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted">zfs_enable="YES"</pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Then start the service:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># service zfs start</code></pre>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="has-text-align-left wp-block-heading">Identify Hardware</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Before setting up ZFS, identify the device names of the disk associated with the system. A quick way of doing this is with:</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"><code># egrep 'da[0-9]|cd[0-9]' /var/run/dmesg.boot</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The output should identify the device names, examples throughout the rest of this guide will use the default SCSI names: da0, da1, and da2. If the hardware differs, make sure to use the correct device names instead.</p>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading" id="zfs-quickstart-single-disk-pool">Creating a Single Disk Pool</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>To create a simple, non-redundant pool using a single disk device:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zpool create example /dev/da0</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>To create files for users to browse within the pool:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># cd /example
# ls
# touch testfile</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The new file can be viewed using <code>ls</code>:</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"><code># ls -al</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>We can already start using more advanced ZFS features and properties. To create a dataset within the pool with compression enabled:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs create example/compressed
# zfs set compression=on example/compressed</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The <code>example/compressed</code> dataset is now a ZFS compressed file system.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Disable compression with:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs set compression=off example/compressed</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>To unmount a file system, use <code>zfs umount</code> and then verify with <code>df</code>:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs umount example/compressed
# df</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Verify that <code>example/compressed</code> is not included as a mounted file under the output.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The file system can be re-mounted with zfs:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs mount example/compressed
# df</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>With the file system mounted, the output should include a line similar to the one below:</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"><code>example/compressed 17547008 0 17547008 0% /example/compressed</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>ZFS datasets are created just like any other file system, the following example creates a new file system called <code>data</code>:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs create example/data</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Use <code>df</code> to see the data and space usage (some of the output has been removed for clarity)</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># df
                                 . . . 
example/compressed  17547008       0 17547008     0%    /example/compressed
example/data        17547008       0 17547008     0%    /example/data</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Because these file systems are built on ZFS, they draw from the same pool for storage. This eliminates the need for volumes and partitions that other file systems rely on.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>To destroy the file systems and then the pool that is no longer needed:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs destroy example/compressed
# zfs destroy example/data
# zpool destroy example</code></pre>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading" id="zfs-quickstart-raid-z">RAID-Z</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>RAID-Z pools require three or more disks but offer protection from data loss if a disk were to fail. Because the ZFS pools can use multiple disks, support for RAID is inherent in the design of the file system</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>To create a RAID-Z pool, specifying the disks to add to the pool:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zpool create storage raidz da0 da1 da2</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>With the zpool created, a new file system can be made in that pool:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs create storage/home</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Enable compression and store an extra copy of directories and files:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs set copies=2 storage/home
# zfs set compression=gzip storage/home</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>A RAID-Z pool is a great place to store crucial system files, such as the home directory for users. To make the file system the home new home directory :</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># cp -rp /home/* /storage/home
# rm -rf /home /usr/home
# ln -s /storage/home /home
# ln -s /storage/home /usr/home</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>File system snapshots can be created to roll back to later, the snapshot name is marked in red and can be whatever you want:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs snapshot storage/home@<mark class="has-inline-color has-vivid-red-color">11-01-22</mark></code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>ZFS creates snapshots of a dataset, allowing users to back up a file system for roll backs or data recovery in the future.</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs rollback storage/home@<mark class="has-inline-color has-vivid-red-color">11-01-22</mark></code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>To list all available snapshots, <code>zfs list</code> can be used:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zfs list -t snapshot storage/home</code></pre>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading" id="zfs-quickstart-recovering-raid-z">Recovering RAID-Z</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Every software RAID has a method of monitoring its <code>state</code>. View the status of RAID-Z devices using:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zpool status -x</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>If all pools are Online and everything is normal, the message shows:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code>all pools are healthy</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>If there is a problem, perhaps a disk being in the Offline state, the pool state will look like this:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code>  pool: storage
 state: DEGRADED
status: One or more devices has been taken offline by the administrator.
	Sufficient replicas exist for the pool to continue functioning in a
	degraded state.
action: Online the device using 'zpool online' or replace the device with
	'zpool replace'.
 scrub: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	storage     DEGRADED     0     0     0
	  raidz1    DEGRADED     0     0     0
	    da0     ONLINE       0     0     0
	    da1     OFFLINE      0     0     0
	    da2     ONLINE       0     0     0

errors: No known data errors</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>&#8220;OFFLINE&#8221; shows the administrator took da1 offline using:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zpool offline storage da1</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Power down the computer now and replace da1. Power up the computer and return da1 to the pool:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zpool replace storage da1</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Next, check the status again, this time without <code>-x</code> to display all pools:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zpool status storage
 pool: storage
 state: ONLINE
 scrub: resilver completed with 0 errors on Fri Nov 4 11:12:03 2022
config:

	NAME        STATE     READ WRITE CKSUM
	storage     ONLINE       0     0     0
	  raidz1    ONLINE       0     0     0
	    da0     ONLINE       0     0     0
	    da1     ONLINE       0     0     0
	    da2     ONLINE       0     0     0

errors: No known data errors</code></pre>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading" id="zfs-quickstart-data-verification">Data Verification</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>ZFS uses checksums to verify the integrity of stored data, these data checksums can be verified (which is called <em>scrubbing</em>) to ensure integrity of the storage pool:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zpool scrub storage</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Only one scrub can be run at a time due to the heavy input/output requirements. The length of the scrub depends on how much data is store in the pool.After scrubbing completes, view the status with <code>zpool status</code>:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># zpool status storage
 pool: storage
 state: ONLINE
 scrub: scrub completed with 0 errors on Fri Nov 4 11:19:52 2022
config:

	NAME        STATE     READ WRITE CKSUM
	storage     ONLINE       0     0     0
	  raidz1    ONLINE       0     0     0
	    da0     ONLINE       0     0     0
	    da1     ONLINE       0     0     0
	    da2     ONLINE       0     0     0

errors: No known data errors</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Displaying the completion date of the last scrubbing helps decide when to start another. Routine scrubs help protect data from silent corruption and ensure the integrity of the pool.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading">ZFS Administration</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>ZFS has two main utilities for administration: The <code>zpool</code> utility controls the operation of the pool and allows adding, removing, replacing, and managing disks. The <a href="https://docs.freebsd.org/en/books/handbook/zfs/#zfs-zfs"><code>zfs</code></a> utility allows creating, destroying, and managing datasets, both file systems and volumes.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>While this introductory guide won&#8217;t cover ZFS administration, you can refer to <a href="https://www.freebsd.org/cgi/man.cgi?query=zfs&amp;sektion=8&amp;format=html">zfs(8)</a> and <a href="https://www.freebsd.org/cgi/man.cgi?query=zpool&amp;sektion=8&amp;format=html">zpool(8)</a> for other ZFS options.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading">Further Resources</h2>
<p></section>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li><a href="https://openzfs.org/">OpenZFS</a></li>
	<li><a href="https://wiki.freebsd.org/ZFSTuningGuide">FreeBSD Wiki &#8211; ZFS Tuning</a></li>
	<li><a href="https://calomel.org/zfs_raid_speed_capacity.html">Calomel Blog &#8211; ZFS Raidz Performance, Capacity and Integrity</a></li>
</ul>
<p></section><section class="block block-classic-editor"></p></section><p>The post <a href="https://freebsdfoundation.org/resource/an-introduction-to-the-z-file-system/">An Introduction to ZFS</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Binary Package Management on FreeBSD</title>
		<link>https://freebsdfoundation.org/resource/binary-package-management-on-freebsd/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Thu, 12 Jan 2023 15:06:56 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=11736</guid>

					<description><![CDATA[<p>The simplest way to install and manage applications and system tools on FreeBSD is through the pkg package management tool, which makes dealing with binary packages fast and easy. Binary packages are pre-compiled and require no in-depth understanding of compiling software on FreeBSD, making them the ideal method to install software for new users.</p>
<p>The post <a href="https://freebsdfoundation.org/resource/binary-package-management-on-freebsd/">Binary Package Management on FreeBSD</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor">
<p id="pkgng-intro">The simplest way to install and manage applications and system tools on FreeBSD is through the <code>pkg</code> package management tool, which makes dealing with binary packages fast and easy. Binary packages are pre-compiled and require no in-depth understanding of compiling software on FreeBSD, making them the ideal method to install software for new users.</p>
<p><img loading="lazy" decoding="async" class="wp-image-11737 aligncenter" src="https://freebsdfoundation.org/wp-content/uploads/2022/10/Untitled-design-26-1024x577.png" alt="" width="692" height="390" srcset="https://freebsdfoundation.org/wp-content/uploads/2022/10/Untitled-design-26-1024x577.png 1024w, https://freebsdfoundation.org/wp-content/uploads/2022/10/Untitled-design-26-300x169.png 300w, https://freebsdfoundation.org/wp-content/uploads/2022/10/Untitled-design-26-1536x865.png 1536w, https://freebsdfoundation.org/wp-content/uploads/2022/10/Untitled-design-26.png 1640w" sizes="(max-width: 692px) 100vw, 692px" /></p>
<div class="sectionbody">
<div class="sect2">
<h2 id="pkgng-initial-setup">1. Getting Started with pkg</h2>
<div class="paragraph">
<p>FreeBSD includes a bootstrap utility which can be used to download and install pkg and its manual pages. This process will require a working Internet connection.</p>
</div>
<div class="admonitionblock note">To bootstrap the system, run:</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># /usr/sbin/pkg</span></code></pre>
<div class="copy-to-clipboard-wrapper">Usage information for pkg is available in the <a href="https://www.freebsd.org/cgi/man.cgi?query=pkg&amp;sektion=8&amp;format=html">pkg(8)</a> manual page or by running <code>pkg</code> without additional arguments. To access the manual page run:</div>
</div>
<pre><code># man pkg</code></pre>
</div>
<div class="paragraph">
<p>Each pkg command argument is documented in a command-specific manual page. To read the manual page for <code>pkg install</code>, for example, run either of these commands:</p>
</div>
<div class="listingblock">
<div class="content">
<pre><code data-lang="shell"><span class="c"># pkg help install</span></code> <code><span class="c"># man pkg-install</span></code></pre>
</div>
</div>
<div class="listingblock">
<div class="content">
<div class="copy-to-clipboard-wrapper"> </div>
</div>
</div>
<h2 id="pkgng-installing-deinstalling">2. Installing and Removing Packages</h2>
<div class="paragraph">
<p>To install a binary package, use the following command, where <em>packagename</em> is the name of the package to install:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># pkg install packagename</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Before the installer proceeds, the system will ask to confirm and approve the changes, this can be done be either typing &#8220;y&#8221; or &#8220;n&#8221; to approve or cancel the process. Once complete, the new package and any additional packages that were installed as dependencies can be seen in the installed packages list:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># pkg info</span>
ca_root_nss-3.15.1_1	The root certificate bundle from the Mozilla Project
curl-7.31.0_1	Non-interactive tool to get files from FTP, GOPHER, HTTP<span class="o">(</span>S<span class="o">)</span> servers
pkg-1.1.4_6	New generation package manager</code></pre>
<div class="copy-to-clipboard-wrapper">Packages that are no longer needed can be removed with <code>pkg delete</code>. For example:</div>
</div>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># pkg delete curl</span>
</code></pre>
</div>
</div>
<h2 id="pkgng-upgrading">3. Upgrading Installed Packages</h2>
<div class="paragraph">
<p>Installed packages can be upgraded to their latest versions by running:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># pkg upgrade</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>This command will compare the installed versions with those available in the repository catalogue and upgrade them from the repository.</p>
</div>
</div>
</div>
</section><p>The post <a href="https://freebsdfoundation.org/resource/binary-package-management-on-freebsd/">Binary Package Management on FreeBSD</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Video Playback on FreeBSD &#8211; Quick Guide</title>
		<link>https://freebsdfoundation.org/resource/video-playback-on-freebsd-quick-guide/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Thu, 01 Sep 2022 20:26:36 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=11665</guid>

					<description><![CDATA[<p>In this guide, we&#8217;ll use the xine video player to set up basic video playback on a fresh FreeBSD install. The xine multimedia player relies on the XWindow system and the XVideo extension to provide a graphical video playback interface. System Requirements: Xorg supports a wide variety of video cards, but not all are supported [&#8230;]</p>
<p>The post <a href="https://freebsdfoundation.org/resource/video-playback-on-freebsd-quick-guide/">Video Playback on FreeBSD – Quick Guide</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor"><p></section><section class="block block-core-paragraph"></p>
<p>In this guide, we&#8217;ll use the xine video player to set up basic video playback on a fresh FreeBSD install. The xine multimedia player relies on the XWindow system and the XVideo extension to provide a graphical video playback interface.</p>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" class="wp-image-11627" src="https://freebsdfoundation.org/wp-content/uploads/2022/08/Untitled-design-23-1024x576.png" alt="" width="840" height="472" srcset="https://freebsdfoundation.org/wp-content/uploads/2022/08/Untitled-design-23-1024x576.png 1024w, https://freebsdfoundation.org/wp-content/uploads/2022/08/Untitled-design-23-300x169.png 300w, https://freebsdfoundation.org/wp-content/uploads/2022/08/Untitled-design-23-1536x864.png 1536w, https://freebsdfoundation.org/wp-content/uploads/2022/08/Untitled-design-23.png 1920w" sizes="(max-width: 840px) 100vw, 840px" /></figure>
<p></section></div>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading">System Requirements:</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Xorg supports a wide variety of video cards, but not all are supported or offer good video playback performance.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>It is a good idea to have a short MPEG test file for evaluating various players and options. Since some <code>DVD</code> applications look for <code>DVD</code> media in /dev/dvd by default, or have this device name hardcoded in them, it might be useful to make a symbolic link to the proper device:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># ln -sf /dev/cd0 /dev/dvd</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Due to the nature of <a href="https://www.freebsd.org/cgi/man.cgi?query=devfs&amp;sektion=5&amp;format=html">devfs(5)</a>, manually created links will not persist after a system reboot. In order to recreate the symbolic link automatically when the system boots, add the following line to /etc/devfs.conf:</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted">link cd0 dvd</pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>&nbsp;</p>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading" id="video-interface">Installing Xorg</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>There are several possible ways to display video under Xorg and what works is largely hardware dependent. This guide will focus on the Xvideo extension which allows video to be directly displayed, even on low-end machines.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Start by installing the X Window System:</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"># <code>pkg install -y xorg</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Once the package has been fully installed, the X Window System can be started with:</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"># <code>startx</code></pre>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading" id="video-interface-xvideo">XVideo Support</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>To check whether the Xvideo extension is running, use <code>xvinfo</code>:</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"><code>xvinfo</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>If XVideo is supported, the result will look similar to the example below and may include screen and video card information.</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code>X-Video Extension version 2.2
  screen #0
  Adaptor #0: "Example Engine"
    number of ports: 1
    port base: 43
     
       .   .    .</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>&nbsp;</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>XVideo is likely unsupported by the video card if the result instead look like:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code>X-Video Extension version 2.2
screen #0
no adaptors present</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The display may be unable to meet the demands of rendering video playback if XVideo is unsupported (though this is not always the case).</p>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading">The xine Video Player</h2>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="618" height="235" class="wp-image-11650" src="https://freebsdfoundation.org/wp-content/uploads/2022/09/Screenshot-2022-09-01-154324.png" alt="" srcset="https://freebsdfoundation.org/wp-content/uploads/2022/09/Screenshot-2022-09-01-154324.png 618w, https://freebsdfoundation.org/wp-content/uploads/2022/09/Screenshot-2022-09-01-154324-300x114.png 300w" sizes="(max-width: 618px) 100vw, 618px" /></figure>
<p></section></div>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>xine is a free multimedia player. It plays back CDs, DVDs, BluRays and VCDs. It also decodes multimedia files like AVI, MOV, WMV, and MP3 from local disk drives, and displays multimedia streamed over the Internet. Get started by installing the package:</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"><code># pkg install -y xine</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>In practice, xine requires either a fast CPU or support for the XVideo extension. The xine video player performs best on XVideo interfaces. If in the previous step, the Xvideo extension was unsupported, issues may occur.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The xine player starts a graphical user interface (GUI) and the menus can be used to navigate to multimedia files.</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"><code># xine</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Alternatively, xine may be directly invoked from the command line by specifying the name of the file to play:</p>
<p></section>
<section class="block block-core-code"></p>
<pre class="wp-block-code"><code># xine -g -p mymovie.avi</code></pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>You now have a simple way to play a variety of multimedia files on your FreeBSD system! To find out more about the xine player, refer to the <a href="https://sourceforge.net/projects/xine/" target="_blank" rel="noreferrer noopener">SourceForge page</a>.</p>
<p></section><section class="block block-classic-editor"></p></section><p>The post <a href="https://freebsdfoundation.org/resource/video-playback-on-freebsd-quick-guide/">Video Playback on FreeBSD – Quick Guide</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Installing a Port on FreeBSD &#8211; Video Guide</title>
		<link>https://freebsdfoundation.org/resource/installing-a-port-on-freebsd-video-guide-2/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Mon, 22 Aug 2022 16:53:35 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=11539</guid>

					<description><![CDATA[<p>FreeBSD offers two primary methods of downloading applications and system tools: packages and ports. This video guide focuses on using the port collection to install irssi, a powerful and modular text-based Internet Relay Chat (IRC) client.</p>
<p>The post <a href="https://freebsdfoundation.org/resource/installing-a-port-on-freebsd-video-guide-2/">Installing a Port on FreeBSD – Video Guide</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor">
<p><iframe title="YouTube video player" src="//www.youtube.com/embed/lywkQkTXMEY" width="1000" height="550" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
</section><p>The post <a href="https://freebsdfoundation.org/resource/installing-a-port-on-freebsd-video-guide-2/">Installing a Port on FreeBSD – Video Guide</a> first appeared on <a href="https://freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
