How to override cart/item/renderer/actions/edit.phtml template in Magento 2?

You can override cart/item/renderer/actions/edit.phtml file using layout XML way or directly add template file to the theme level under Magento_Checkout theme module.

  • Theme level Override,
app/design/frontend/<ThemePackage>/themename/Magento_Checkout/templates/cart/item/renderer/actions/edit.phtml

edit.phtml file used to display edit link for every cart item within the last column in cart table.

  • Module-level Override,

You can see the base definition for define edit.phtml file at Magento_Checkout module,
Magento_Checkout/view/frontend/layout/checkout_cart_item_renderers.xml location.

you can see registration form by URL, <SITE_URL>/checkout/cart

You can override using Layout XML inside a module by <referenceBlock> node,

Create a XML file, app/code/<Rbj/Cart>/view/frontend/layout/checkout_cart_item_renderers.xml
In the above path, <Rbj/Cart> replace with your Package/Modulename.

edit.phtml file used for all the product type.
If you want to override edit.phtml file for all the product type you need to override with all the block class name with different product type in your XML file.

Example,
checkout.cart.item.renderers.simple.actions.edit class name used for simple product edit link.
checkout.cart.item.renderers.bundle.actions.edit class name used for bundle product edit link.

<?xml version="1.0"?>
<!--
/**
 * @author  Rakesh Jesadiya
 * @package Rbj_Cart
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.cart.item.renderers.default.actions.edit">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Rbj_Cart::cart/item/renderer/actions/edit.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="checkout.cart.item.renderers.simple.actions.edit">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Rbj_Cart::cart/item/renderer/actions/edit.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="checkout.cart.item.renderers.configurable.actions.edit">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Rbj_Cart::cart/item/renderer/actions/edit.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="checkout.cart.item.renderers.bundle.actions.edit">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Rbj_Cart::cart/item/renderer/actions/edit.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="checkout.cart.item.renderers.downloadable.actions.edit">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Rbj_Cart::cart/item/renderer/actions/edit.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="checkout.cart.item.renderers.grouped.actions.edit">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Rbj_Cart::cart/item/renderer/actions/edit.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="checkout.cart.item.renderers.virtual.actions.edit">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Rbj_Cart::cart/item/renderer/actions/edit.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

Create a template file at location,
app/code/<Rbj/Cart>/frontend/templates/cart/item/renderer/actions/edit.phtml

Clear a cache and check your login page.