Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-11-2012, 12:19 PM
|
#1
|
Member
Registered: May 2007
Posts: 430
Rep:
|
Weird behaviour
I just ordered a VPS running Ubuntu 12.04 LTS 64bit.
For some reason when I ssh into the machine and press the up arrow I get ^A[[ that shows. I've been searching on and off for two days and can't seem to find a solution.
Could someone please tell me how to get the history working correctly?
In addition, the .profile or .bash_profile file does not seem to be loading. I've tried setting my prompt to a color prompt but I get the same weird characters. I've tried setting the color_prompt=yes and force_color_prompt=yes but as mentioned the file doesn't seem to be loading.
The .bashrc file is only loading AFTER you enter a shell from within bash.
|
|
|
07-11-2012, 12:48 PM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,207
|
what is the command you used to log in? What is your login shell?
|
|
|
07-11-2012, 12:57 PM
|
#3
|
Member
Registered: May 2007
Posts: 430
Original Poster
Rep:
|
Not really sure what you mean. My VPS is remote so I'm using the terminal on my laptop to ssh into with:
# ssh IP.ADDRESS -p PORT
The username is the same on my laptop as the remote server so it is attempting to login (successfully) with the same username.
|
|
|
07-11-2012, 01:13 PM
|
#4
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,207
|
yes, that's fine: ssh host -p port is ok. You can check your shell by executing echo $0
|
|
|
07-11-2012, 01:15 PM
|
#5
|
Member
Registered: May 2007
Posts: 430
Original Poster
Rep:
|
$ echo $0
-sh
|
|
1 members found this post helpful.
|
07-11-2012, 01:17 PM
|
#6
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,207
|
try ssh host -p port bash --login -i
|
|
|
07-11-2012, 01:22 PM
|
#7
|
Member
Registered: May 2007
Posts: 430
Original Poster
Rep:
|
Same thing... I just tried that command to login via ssh and this is what I got after it logged in:
bash: no job control in this shell
There is still no color in the prompt and the arrow keys are still showing those weird characters.
|
|
|
07-11-2012, 01:41 PM
|
#8
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,207
|
the strange behavior is caused because your login shell is sh, not bash. This is normal. You can try ssh as you did it before and execute bash on VPS. Have you modified your .profile, .bashrc or any other login related files? (and what about the /etc/profile?)
|
|
|
07-11-2012, 09:49 PM
|
#9
|
Member
Registered: May 2007
Posts: 430
Original Poster
Rep:
|
I have edited the .bashrc and .profile files. I commented out the line saying to only load .bashrc if interactive mode.
How can I set it up to use bash instead of sh?
|
|
|
07-12-2012, 01:01 PM
|
#10
|
Member
Registered: May 2007
Posts: 430
Original Poster
Rep:
|
I was able to get it working by going into the /etc/passwd file and changing the shell to bash.
Thanks for the help!
|
|
1 members found this post helpful.
|
10-22-2012, 10:30 PM
|
#11
|
LQ Newbie
Registered: May 2007
Location: Melbourne, Australia
Posts: 12
Rep:
|
I'm having the same trouble on Ubuntu 12.02 server. I login from a windows PC with Putty. One one account everything is fine, the arrow keys and history work Ok. However, on another account on same server, the arrow keys work as described here.
Both accounts show as being bash shells and there is no difference between the .login and .bashrc files for both users.
Any ideas what the issue is here
..thegerm
Update: the problem was really as Jim Thorton posted, I changed the shell type in /etc/passwd with a 'chsh' command now it it works fine.
Last edited by thegerm; 10-23-2012 at 03:23 AM.
Reason: update
|
|
|
All times are GMT -5. The time now is 12:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|