<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2025-12-22</periodOfReport>

    <issuer>
        <issuerCik>0001642896</issuerCik>
        <issuerName>Samsara Inc.</issuerName>
        <issuerTradingSymbol>IOT</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001895101</rptOwnerCik>
            <rptOwnerName>Eltoukhy Adam</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O SAMSARA INC.</rptOwnerStreet1>
            <rptOwnerStreet2>1 DE HARO STREET</rptOwnerStreet2>
            <rptOwnerCity>SAN FRANCISCO</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>94107</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>false</isDirector>
            <isOfficer>true</isOfficer>
            <isTenPercentOwner>false</isTenPercentOwner>
            <isOther>false</isOther>
            <officerTitle>SEE REMARKS</officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>1</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2025-12-22</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>4688</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>38.3242</value>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>246675</value>
                    <footnoteId id="F3"/>
                    <footnoteId id="F4"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Class A Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>126547</value>
                    <footnoteId id="F4"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnote</value>
                    <footnoteId id="F5"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable></derivativeTable>

    <footnotes>
        <footnote id="F1">The sales reported by the Reporting Person were effected pursuant to a Rule 10b5-1 trading plan adopted March 28, 2025.</footnote>
        <footnote id="F2">The &quot;Amount&quot; and &quot;Price&quot; reported in this Column 4 reflect the aggregate number and weighted-average price, respectively, of shares sold. These shares were sold in multiple transactions at prices ranging from $38.02 to $38.69, inclusive. The Reporting Person undertakes to provide to the issuer, any security holder of the issuer, or the SEC staff, upon request, full information regarding the number of shares sold at each separate price within the ranges set forth herein.</footnote>
        <footnote id="F3">Certain of these securities are restricted stock units (RSUs). Each RSU represents a contingent right to receive one share of Class A Common Stock, subject to the applicable vesting schedule and conditions of each RSU.</footnote>
        <footnote id="F4">The number of shares held reflects the transfer of 4,688 shares of Class A Common Stock from AE and NS, Co-Trustees of the ES Trust, over which the Reporting Person has voting or investment power (the &quot;ES Trust&quot;), to the Reporting Person.</footnote>
        <footnote id="F5">Consists of shares held by the ES Trust.</footnote>
    </footnotes>

    <remarks>Executive Vice President, Chief Legal Officer and Secretary</remarks>

    <ownerSignature>
        <signatureName>/s/ Adam Eltoukhy</signatureName>
        <signatureDate>2025-12-23</signatureDate>
    </ownerSignature>
</ownershipDocument>
