Configuring Bourne Shell
Hi
This is more of a request for info rather than help. I have a Cnm Minibook that uses the Bourne Shell. I was trying to amend it's startup file to change prompt and add aliases. On googling, I found that the Bourne shell's startup files are located in /etc/profile and $HOME/.profile. The details of what I did is in my blog: http://cnm-minibook-mucking-about.bl...erm-shell.html I them did the same on the Bourne Shell on my Ubuntu machine and amended the /etc/profile and $HOME/.profile by changing the prompt to: PS1='\u\w> ' When I type in sh to go into Bourne shell it still displays $ Is this the normal behaviour of the Bourne Shell? |
try /bin/bash and see if it works that way. also I believe the file edited should be ~/.bash_profile or ~/.bashrc generally if anything needs to be applied across all accounts then their is /etc/bashrc too I believe as ~/.bash_profile points at ~/.bashrc and ~/.bashrc points at /etc/bashrc but I use CentOS mainly what is Red Hat based, could be different for Debian based distros.
|
In, say, /etc/profile you can set the prompt system-wide (and remember that you have to log out and log back in again for any changes you make to take effect):
Code:
# Get the name (without the domain part) of the host (this is fancy-schmancy) Ought to work for you this way (or modify as you see fit). A bare-bones default might look like this: Code:
PS1='\u@\h:\w\$ ' Code:
PS2='> ' Code:
export PS1 PS2 |
I think sh in Ubuntu is a link to dash, not bash.
|
All times are GMT -5. The time now is 08:24 PM. |