Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exit Bash Mode? [closed]

Tags:

linux

bash

I apologize for asking such a dumb question but my linux server is stuck in "bash" mode. When I log on through the terminal my command line looks like this:

-bash-3.2$

I cannot execute other commands because of this. If I type "exit" it closes the terminal window. How can I exit this bash mode so I can enter commands?!

like image 376
Kevin Avatar asked Aug 12 '26 08:08

Kevin


2 Answers

Try running the command reset it's possible you've screwed up the session.

Try running tput setb 6 which changes the bgcolor to dark red. If it works then your settings are screwed up:

most likely if you have not been rooting around your system configs without proper knowledge of things: rm ~/.bashrc

CTRL+ALT+F2 will pull you out of the X-Windows system and slam you into console. If things don't work properly there... you've screwed things up big time. Consult a NIX user forum for help with this topic as it isn't really a programming question.

http://www.unix.stackexchange.com/

Oh, and tput setb 0 will restore your default background color.

If this is not the shell you want, you can always type in eg. zsh, tcsh or whatever inside this bash session to get into your shell of choice.

On a more permanent basis, your shell of choice is associated with your user-account. Examining /etc/passwd, you will find that the final item on each line defines which shell that user uses. Yours is likely to be set to /bin/sh or /bin/bash.

You are likely to have a GUI configuration tool, eg 'Users and Groups' on Ubuntu, where you can set your default shell.

Any changes to those settings take effect upon your next login.

like image 23
kampu Avatar answered Aug 14 '26 23:08

kampu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!