How to get a url of a file in a SharePoint site with the “new look”

When working with SharePoint we often need a direct URL of a file, for example when setting URLs of document templates or images, but with introduction of the new SharePoint experience, getting URL became simingly impossible to get.
In the classic SharePoint it was easy, simply click on an eclipse and it’s there:


With the new experience, we have an option to “Get a Link”, but that by default creates a Guestaccess link – not what we need. Fortunately there’s a “Default link type” setting in SharePoint, which controls what link is generated by default.

Default link type setting

When the setting is set to Direct, “Get a Link” will give us a direct URL to the file, the same link that we had in the classic look: