View Full Version : DOS PROMPT comand Linux counterpart
Lowcarb
04-21-2004, 02:13 PM
What is the Linux equivalent to the DOS PROMPT command?
Now that I'm networking a 2nd Tivo I want the bash prompts to look different.
TIA
You want the prompt to look different on two different linux systems?
TheWickedPriest
04-21-2004, 03:06 PM
No command per se, but the prompt is defined by the environment variable "PS1". (On DOS, it's the environment variable "PROMPT" -- the prompt command is really just an alias for "set PROMPT=".)
To learn all the options, etc., you should really read the bash man page. If you don't have one handy (e.g., on a standard Linux system), do a Google search for "man bash". The first three results, as of the search I just did, were HTMLized copies of the man page.
Lowcarb
04-21-2004, 03:23 PM
Thanks all
I want to have PS1="[\h:][\w]\$ "
That syntax works fine from bash.
If I want to put this in rc.sysinit.author would I make it
ENV PS1="[\h:][\w]\$ "
? :confused:
BTW I got enlightened to this web page.
It may be helpful to others
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/index.html
AlphaWolf
04-21-2004, 03:33 PM
I used to live on dos before windows 2000 came around, but over the last 4 years I have grown to like bash much better. Piping, redirecting, everything as a file, pull random numbers from /dev/random, throw garbage output in /dev/null, generate padding from /dev/zero, dd to directly copy data in specific segments, etc... Makes pretty much everything you do much more practical/easier. I wish an environment like that existed for windows and worked seemlessly with it.
mikey
04-21-2004, 04:17 PM
I use
PS1="Insert Your Text here \w\\$"
in /.profile I believe I copied it from extreme or xupgrade, but don't really remember. if your familiar with dos Here (http://www.dealdatabase.com/forum/showthread.php?t=25583&highlight=bash+alias) is a thread with a lot of info.
Hope it helps,
mikey
cojonesdetoro
04-21-2004, 04:20 PM
I wish an environment like that existed for windows and worked seemlessly with it.
Have you checked out cygwin? IMHO, it's about as close as you can get to a true Unix environment under windblows short of emulation.
AlphaWolf
04-21-2004, 05:28 PM
Have you checked out cygwin? IMHO, it's about as close as you can get to a true Unix environment under windblows short of emulation.
Yeah, I've tried it, but it just isn't quite the same. Plus, the console feels a bit laggy.
BubbleLamp
04-21-2004, 06:26 PM
I used to live on dos before windows 2000 came around, but over the last 4 years I have grown to like bash much better. Piping, redirecting, everything as a file, pull random numbers from /dev/random, throw garbage output in /dev/null, generate padding from /dev/zero, dd to directly copy data in specific segments, etc... Makes pretty much everything you do much more practical/easier. I wish an environment like that existed for windows and worked seemlessly with it.
There used to be something, I think it was called MKS toolkit.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.