In Magento 1, To add the logout link we can directly write in customer.xml file.

But now we are thinking how to add logout link

Now,Let’s Start

1. Create the customer_account.xml in the path app/design/frontend/<vendor>/<theme>/Magento_Customer/layout

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="customer_account_navigation"><!--ifconfig="wishlist/general/active"-->
<block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-logout-link">
<arguments>
<argument name="path" xsi:type="string">customer/account/logout</argument>
<argument name="label" xsi:type="string">Logout</argument>
</arguments>
</block>
</referenceBlock>
</body>
</page>

Now then refresh the page and check in My Account Navigation.