PDA

View Full Version : Why a $ command line?



BigJules
September 14th, 2007, 07:32 PM
So I'm a newbie from the Other Side. Still nobody's told me why Linux has a "$" (!!!) for a command line prefix while (at least while they had one) Micro$oft had a ">" which literally translated says a lot about their modesty.

Come on, Ubuntu, time for a change? Or can we suggest one?

Spike-X
September 14th, 2007, 07:33 PM
Why not?

Lord Illidan
September 14th, 2007, 07:36 PM
Does it matter so much? The default setting is a dollar sign when running as a normal user and a pound sign # when running as root. You can change this, of course.

Read here : http://en.wikipedia.org/wiki/Dollar_sign#Use_on_computers

glupee
September 14th, 2007, 07:36 PM
I think there's a way to change it. Not sure tho, will look into it.

EDIT: lol, typed as you posted (Lord Illiad) i guess.

fwojciec
September 14th, 2007, 07:40 PM
Of course there is a way to change it - it's linux ;)

Calash
September 14th, 2007, 07:41 PM
It has to do with the terminal shell you are using.

Ubuntu ships with BASH, and that uses $ by default for a standard user, # for root.

This can be changed using the export command.


As for why they picked $....no idea :)

igknighted
September 14th, 2007, 07:42 PM
Mine has a %, because I use the z-shell. I think that there are a few *nix shells that use > as well (tcsh or ksh maybe? I forget...). Bash chose to use $ for whatever reason, and since that is what Ubuntu uses as default thats what you have as default. But that shell (and even within bash the symbols it uses) can all be changed.

Spike-X
September 14th, 2007, 07:45 PM
... a pound sign #

*psst* That's actually a 'hash' sign (or 'sharp', if you're a musician)

This is a pound sign: £

Bothered
September 14th, 2007, 07:45 PM
It's set according to your PS1 environment variable.

Lord Illidan
September 14th, 2007, 07:55 PM
*psst* That's actually a 'hash' sign (or 'sharp', if you're a musician)

This is a pound sign: £

My mistake..but actually the Americans do call it a pound sign. I guess I got it from a book about c-sharp (or c-pound :P)

John.Michael.Kane
September 14th, 2007, 07:55 PM
For those wanting to change the prompt
Howo: Change / Setup bash custom prompt (http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html)

mikewhatever
September 14th, 2007, 07:59 PM
So I'm a newbie from the Other Side. Still nobody's told me why Linux has a "$" (!!!) for a command line prefix while (at least while they had one) Micro$oft had a ">" which literally translated says a lot about their modesty.

Come on, Ubuntu, time for a change? Or can we suggest one?

It looks like Ubuntu works too well for you, no issues and all, so that you are concerned with that kind of particulars.

Spike-X
September 14th, 2007, 08:01 PM
...actually the Americans do call it a pound sign.

What do y'all call this, then? - £

SuperDuck
September 14th, 2007, 08:08 PM
What do y'all call this, then? - £

We say "That goofy 'L' thing"... It's not even on our keyboards.

Ultra Magnus
September 14th, 2007, 08:16 PM
Hmmm.... Though £ is a superior symbol and currency to $ - it doesn't really work well on the console - So I changed mine to a freindly message to myself - Does anyone have a keyboard with a euro sign on it - On my 4 Button I have both $ and euro, but how do I get it print the euro sign?

perce
September 14th, 2007, 08:49 PM
Hmmm.... Though £ is a superior symbol and currency to $ - it doesn't really work well on the console - So I changed mine to a freindly message to myself - Does anyone have a keyboard with a euro sign on it - On my 4 Button I have both $ and euro, but how do I get it print the euro sign?

Go to preferences > keyboard > layout options and it will let you add € to some key

psusi
September 14th, 2007, 08:59 PM
Different kind of pound. One is a currency, the other is what you do to your telephone when it stops working.

Different people call it different things though, so I use them interchangeably... pound, hash, sharp... all work, though I usually prefer pound.

On a side note, programmers pronounce $ as "string" not "dollar sign", ! as "bang". The first two characters of any shell script are #! which is pronounced as "sh-e-bang", a concatenation of hash and bang.

jdong
September 14th, 2007, 09:04 PM
*psst* That's actually a 'hash' sign (or 'sharp', if you're a musician)

This is a pound sign: £

Nope, you're all wrong, it's an octothorpe ;-)

P.S. That's not the sharp sign either.

SunnyRabbiera
September 14th, 2007, 09:56 PM
From what I know this all goes back to the ol traditional termninals of the early command line PC.
Dos had this and so did unix as far as I know, dont think apple had this though.

Spike-X
September 14th, 2007, 10:52 PM
P.S. That's not the sharp sign either.

It's close enough!

markp1989
September 14th, 2007, 10:56 PM
Hmmm.... Though £ is a superior symbol and currency to $ - it doesn't really work well on the console - So I changed mine to a freindly message to myself - Does anyone have a keyboard with a euro sign on it - On my 4 Button I have both $ and euro, but how do I get it print the euro sign?

alt gr + 4 on my computer (standard UK keyboard)