Hacker News new | ask | show | jobs
by neilv 1029 days ago
This goes back to pre-Web, originally to distinguish normal user (`$`) from `root` user (`#`), and sometimes from C-shell or some non-shell interactive line-oriented program.

I used to think it was dumb and annoying.

I partly changed my mind recently, when I found myself copy&pasting lots of quick wiki-like documentation into Markdown fenced code blocks that involved multiple hosts.

Just having the hostname in the prompt reduces the text I have to type in addition to the copy&past, to explain where this command is happening, such as on the workstation vs. one of the servers.

(But it didn't quite help the other day, when I was documenting some self-hosted LLM procedures, and needed to be copy&pasting examples from multiple Screen terminals on the same host, where the prompt didn't distinguish them.)