LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 08-01-2012, 02:09 PM   #1
Sirocco
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Rep: Reputation: Disabled
Login shell


Hi guys,

I have a probably very easy question but I'm struggling to solve it. I wrote a script in sh, changed the shell to /bin/sh, simple as is. Today I changed the shell back to bash (I messed up something so I had to change it in /etc/passwd back to /bin/bash) but every time I launch the terminal, I can see the sh prompt. I use pubuntu, the username is pubuntu as well. Even though the default shell is bash both for the user and root in passwd, every time I start a new session, the default shell is sh. Do anybody know how I can change it?

Every help is much appreciated.

Thanks,
Sirocco
 
Old 08-01-2012, 02:15 PM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Change the link pointed to by /bin/sh to /bin/bash.
Code:
ln -s /bin/bash /bin/sh
 
Old 08-01-2012, 02:24 PM   #3
Sirocco
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi towheedm,

Normally I would say it's the default (sh is linked to bash) but tried it now and works perfectly well. I must have messed something up, echo $0 gives bash immediately. Thanks very much.
 
  


Reply



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
How to check in a script whether the shell is login or non login? frankie_DJ Programming 7 10-21-2015 10:09 AM
Difference between normal shell and login shell Manish Linux - General 7 11-14-2012 08:30 AM
How do I get the /etc/login.defs in a non login shell acummings Slackware 7 05-20-2007 10:17 PM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 08:28 AM
login shell?? Japan Lnx Linux - Newbie 8 01-22-2005 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:48 AM.

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