How to change prompt in jailshell

3

1

My ISP has switched to jailshell at some point, and now when I SSH in my prompt is always:

-jailshell-3.2$ 

I'd like it to be:

`pwd` $ 

Where do I configure this? I seem to recall some kind of config file, but I can't find it.

Kip

Posted 2009-12-02T15:39:31.660

Reputation: 4 275

Answers

4

Execute:

touch ~/.bashrc; echo 'PS1="\w $"' >> ~/.bashrc

This will create the file .bashrc in your home directory if it doesn't already exist, and append PS1="\w $" to it.

The environment variable PS1 defines your prompt, and the escape sequence \w translates to the current working directory (pwd). A full list of escapes sequences can be found here.

To make the shell reflect the changes made in .bashrc without restarting the session, run source ~/.bashrc.

Arkenklo

Posted 2009-12-02T15:39:31.660

Reputation: 311

if I do source ~/.bashrc I get the prompt like you say, but it isn't doing that on login – Kip – 2009-12-04T13:13:57.823

oh wait i got it to work. since it is a login prompt i have to use ~/.bash_profile, not ~/.bashrc – Kip – 2009-12-04T13:15:49.197

Awesome, I'm glad it worked :). – Arkenklo – 2009-12-05T11:15:49.773

2

AFAIK jailshell reads .bashrc
so man bash is your friend

JumpingPA

Posted 2009-12-02T15:39:31.660

Reputation: 214

0

~/.bash_profile - This works for hostgator PS1 prompt

Gauthier

Posted 2009-12-02T15:39:31.660

Reputation: 101