1

Environment: SunRay terminal, running on Solaris 5.10 host. SHELL=/bin/bash

Goal: set up some aliases for long commands

Trying a simple alias: alias p='pwd'

I've tried to add this alias to .bash_profile, .aliases and .aliases with no luck. In linux I'd put the aliase in .bash_profile. Where should I put it in Solaris?

  • 1
    Do you have a ~/.profile? Also did you restart your session after adding to .bash_profile? – Jesse_b May 10 '18 at 20:14
  • To see which files are relevant, read Bash Startup Files in the bash manual – glenn jackman May 10 '18 at 20:53
3

They should go in your ~/.bashrc file. Solaris will also use .bash_profile though so it's odd that isn't working for you.

Note: You will have to restart your session (Or at least source the .bashrc file) before the aliases placed in there will be available.

  • That did it. .bashrc file was not in the $HOME directory. I created the file and set up an alias. Success! – user2299797 May 15 '18 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.