How to link to Posts page dynamically in WordPress

I constantly find myself searching how to link to the posts page, from any page on a WordPress site.

There are a million and one ways to do it, but it can really be boiled down to a single line – Granted, you need a setup with a specific page for the blog posts. This is the only line of code you will ever need in this scenario.

<?php echo get_permalink( get_option('page_for_posts' ) ); ?>

That’s it, seriously!