Home
Up

Bash

Historically the Bourne shell was the default shell for the root user. Despite being portable and robust, it isn't friendly, with no command history etc.

With Solaris 10 it is now safe to change the default root shell to bash.

I've modified the jumpstart build so that this is the default for all Solaris 10 installs.

There is also a minimal /.bashrc and /.bash_profile to control shell behaviour.
Currently this only sets the prompt, and the screen size when on the console. But the framework is there for future customisations.

The format for the prompt is USERNAME@MACHINENAME:CURRENT DIRECTORY The prompt is colour coded
       Red = production
       cyan = DR
       test = green

Its designed so you can see where you are and what the impact might be from the prompt.

A bit more friendly and informative, than just "#" !!!!

Might just reduce the risk of rebooting the wrong server, or deleting files from the wrong directory.

This is currently setup on ludemis07, ludemis08 and sqrtd1t, and will feature in subsequent Solaris 10 builds.

Within BASH you can use cursor and delete keys to do basic DOS "F3" style editing as well as an awful lot more.



#################################################################
#                                                               #
# .bash_profile file                                            #
#                                                               #
# Executed from the bash shell when you log in.                 #
#                                                               #
#################################################################
#echo "start of .bash_profile"

source ~/.bashrc

#echo "end of .bash_profile"


#################################################################
#                                                               #
# .bashrc file                                                  #
#                                                               #
# Executed from the .bash_profile for each shell                #
#                                                               #
#################################################################
#echo "start of .bashrc"
TTY=`/usr/bin/tty`
###
# Set prompt to cyan
###
 

PS1="\[\033[0;30;42m\u@\h:\w #\033[0m\] "
export PS1

if [ $TTY = "/dev/console" ]
   then
   TERM=vt100
   export TERM
   eval `/usr/openwin/bin/resize`
fi

#echo "end of .bashrc"

 

 

© Andrew Marshallsay 2007