Hacker News new | past | comments | ask | show | jobs | submit login

One thing with $ in a shell prompt - $ is meant to indicate the command should be ran as a normal user, while # indicates the command should be ran as a super user.



Generally, yes. But some guides or tutorials don't respect this convention and use any number of chars including the author's own personal prompt. (I see `>` used often too).


I would always use '>' in README files to indicate the command was to be ran in a command prompt window for Windows users, usually followed with context.


I'm guilty of this, as I have my prompt set to a single > character. I'd be interested to know where the $ as a representation for user input suggestion originated from. I didn't know about # indicating that a command should be run as a superuser


> I'd be interested to know where the $ as a representation for user input suggestion originated from.

In the absence of any configuration, the default prompt for most shells is (or was) simply $. When you su to root, it becomes #


Indeed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: