2

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?

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

1 Answer 1

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.

1
  • That did it. .bashrc file was not in the $HOME directory. I created the file and set up an alias. Success!
    – dthacker
    Commented May 15, 2018 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .