When I push this trail of thought I sometimes believe mainframe programming style slow turnaround: plan, reflect, write, wait for test, correct; was great for this.
Sure exploratory programming, which I used to love, has value, but lots of the development in past days I think came from the technological wonder of "can we do it this way ? cool".
In the post-mainframe golden age, before UNIX and C came to screw everything up, people were using highly interactive programming environments with REPLs, system-wide debuggers, ability to work directly on running processes, etc. I think having access to such tools does not diminish your ability to think (I'm judging by my experience with those tools which somewhat survived in the Lisp world). But the issue with distracting OS seems more real. Back in the 70s, they didn't have a task bar with IM, music player and web browser waiting for you there. It was you and your dev environment.
With a full screen cli, all you see is what you are trying to do in this moment.
With a WIMP interface you have the task bar and whatsnot that may at any time try to grab your attention away.
Never mind all those background processes a modern OS runs, for various reasons.