Bourne-Again SHell (BASH) Question


Recommended Posts

I SSH into my server and the user account normally looks something like this.

[user@computername directory]

except now it looks like this.

bash-2.05b$

What the heck! How do I get it back to how it looked originally. I tried to do some research and I couldn't find the answer. Here is some of the better links that I found with general information into customizing the bash shell. Maybe they will help you in answering my question because I know they didn't help me much .. lols

Getting Started with Bash :: A Bash Tutorial

http://www.hypexr.org/bash_tutorial.shtml

CLI Magic: Customizing your bash environment

Monday June 06, 2005 (06:06 AM GMT)

By: Cameron Newham and Bill Rosenblatt

An environment is a collection of concepts that express the things a computer system does in terms designed to be understandable and coherent, and a look and feel that is comfortable. Unix shells present you with such concepts as files, directories, and standard input and output, while Unix itself gives you tools to work with these, such as file manipulation commands, text editors, and print queues. There are also more sophisticated ways of customizing your shell environment.

This article is excerpted from the recently published book "Learning the bash Shell."

http://enterprise.linux.com/article.pl?sid...3/159245&tid=89

UnixWorld Online: Tutorial Article: No. 018

Getting the Most From Your Shell

By Paul Dunne.

Everyone uses it, but do they know how to use it to best advantage? I'm talking about the Unix shell. No matter whether you log in to a super-duper latest-thing X desktop or with a Wyse 30 over a slow modem connection, you will most likely at some point be using the shell. This article looks at how you can get the most from it.

http://www.networkcomputing.com/unixworld/...8/018shell.html

Link to comment
https://www.neowin.net/forum/topic/330300-bourne-again-shell-bash-question/
Share on other sites

Ok I think i figured out how i broke it. I remember a while back I changed my home directory to something other than /home/<username> because I was using this ssh account to connect thru dreamweaver, so essentially as a secure ftp account. I think why it is not working is because it is looking in the folder where i changed my home diectory too and is not seeing the required bash files which would be.

.bash_history

.bashrc

.bash_logout

.bash_profile

I copied over .bashrc and .bash_profile to my new home direcotry and relogged in, poof my problem sovled!

the only concern now is that the $HOME directory is the root of the webserver. I tried accessing those files using FF but it said access denied which is a good thing! Are there any security concerns to doing it this way? I guess just make sure that we never change the httpd.conf file to allow for apache to display any .* files. I think it is set that way to prevent people from reading the .htaccess files, just in case you have them.

The distro that I am displays that by default. If yours doesn't do that than you might check out this sample .bashrc

It took longer than I thought it would, but eventually I got sick of my bash prompt looking like bash-2.05$ . After a little reading, I knew that I wanted a prompt which consisted of my username, my unqualified hostname, and the basename of my current working directory. Additionally, since I do almost everything in X, I wanted my xterms to have titlebars containing my username, the unqualified hostname, and the full path of the current working directory.

http://overtone.org/articles/bashrc.php

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.