Changing default prompt

Hi, i was wondering if it is possible to change the default prompt for the shells that are availble on your system?

For example, i want to change the prompt for the C shell from % to something like ( or ).

Thanks,

Nav.

Have a look in the man page of C Shell ("man csh") and search for "prompt".

Generally you should stay away from C shell and use a POSIX-compatible shell (ksh or bash).

I hope this helps.

bakunin

set prompt=") "

hello, i tried this rdrtx1 and it doesnt seem to do anything, i will take bakunin advice and only work with the bsh cell for now.

---------- Post updated at 10:36 AM ---------- Previous update was at 10:35 AM ----------

I have found out how to change the bash shell prompt,

the code is:

PS1="Enter text here : "

Now that im able to change it, it only last's for this session. Is there a way of changing it permanently? I have tried using the

export PS1="Enter text here : "

but that does not seem to work. Any suggestions?

What does your .profile look like? the prompt variable would be set there...
Since you are using bash you could try adding in .profile the following:

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
else
..
.

and use a .bashrc to initalize your env... or create a .bash_profile

about csh prompt:
try: set prompt = "$system \!: "
the spaces are important in csh...

But the best is to keep away from this shell unless you are a c guru...

Im very new to unix so i would not know what my .profile looks like or how to access it.

You wouldn't know what your profile looks like until you look at it.

You'd edit it with whatever usual text editor you use. If you don't know, try pico, nano, vi, or vim.

vim ~/.profile

vi was invented in the days before control-keys, so its syntax is a bit odd.