Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-20-2008, 11:36 PM   #1
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221

Rep: Reputation: 31
Problems using Putty (FreeBSD)

Hello all,

I am using "putty" to ssh a Freebsd machine. The problem that I am facing is that once I change to bash shell from C shell and I enter recursively into many directories using cd command then every thing I type after the prompt goes onto next line and coincides with the prompt of second line.


# cd /tmp/one/two/three/four/five/six/seven/eight/nine/ten/
intel:/tmp/one/two/three/four/five/six/seven/eight/nine/ten #

intel:/tmp/one/two/three/four/five/six/seven/eight/nine/ten # cat /etc/apache2/httpd.confintel:/tmp/one/two/three/four/five/six/seven/eight/nine/ten #
How can I stop this behavior of Bash or is it due Putty?

I think what basically I want is the following:

intel# cd /tmp/one/two/three/four/five/six/seven/eight/nine/ten/
This should resolve the issue? Any pointers ?
Old 08-21-2008, 03:53 AM   #2
Senior Member
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
The prompt is controlled by the environmental variable $PS1. (There are also $PS2, $PS3, and $PS4 for special purposes; see bash man page if interested.)

If "intel" is your hostname, then I think what you want is one of the following:

I suggest trying this interactively to see if it gives you the result you want. Or check the man page for many other options for the string to contain. For example to do a prompt similar to what you currently have, but just show the basename of the directory (i.e. the last part of the path) try:

In all of the above, I am assuming that the hash symbol (#) is the result of being root. The above definitions will cause that to change to dollar sign ($) for normal users.

After interactively getting the prompt the way you like it, you can add that line to /etc/profile or ~/.bash_profile as appropriate on the remote machine.

Last edited by blackhole54; 08-21-2008 at 03:57 AM. Reason: typos
Old 08-21-2008, 01:30 PM   #3
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221

Original Poster
Rep: Reputation: 31
Thanks blackhole54....the workaround did the trick...........


bash, freebsd, parag, paragkalra, putty

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with PuTTY... jaepi Linux - Networking 3 05-29-2007 02:13 AM
putty,ssh etc problems Braveheart1980 Linux - General 10 01-06-2006 01:46 PM
Putty problems - cannot connect with server TuXspow Linux - Newbie 1 04-11-2005 03:59 PM
Problems with Putty RahulSingh General 6 09-20-2004 08:35 PM
Im currently using PUTTY but having problems setting display ForumKid Linux - General 3 04-09-2002 06:03 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration