I have spent hours trolling the net looking for a definitive guide on how to make colours (color if you are from the US) work in Solaris 10.
By default colour isn’t enabled but once you know how it is relativity easy to get it to work.
The first step is to download a number of new packages from www.sunfreeware.com the packages needed are as follows:
After all the packages are downloaded and added to your Solaris machine it time to install them using pkgadd.
Get root on your machine and install the packages
pkgadd -d coreutils-8.19-sol10-sparc-local
Do this for each of the downloaded packages.
The next step is to test that colours are now working run the following command to check.
/usr/local/bin/ls –color (this command assumes that you have installed the packages in the default location)
Now that colour is working we just need to modify the profile so that it always works.
Depending on your shell you may need to edit .profile for ksh or .bashrc for bash.
Update PATH by adding the new location to it:
now if you run;
its should return /usr/local/bin/ls
add an alias to your profile to append –color to ls command
alias ls=’/usr/local/bin/ls –color’
Reload your profile and type ls, the results should return in colour.
The final section of this guide is to change the colour of your shell prompt you can do so by adding the folowing command to your profile
export PS1=”\e[0;35m\[email protected]\h > \e[m”
You can set the colour to any of the below by editing the number;
You should now have a fully coloured SHELL prompt.