aliases

Hello,
I’m new to qnx.
I wanted to write some aliases in the file “.profile”.
I wrote (for example):
alias cd…=‘cd …’
But this had no effect.
Do I have to write those aliases in a different way or in a different file?
Thanx a lot in advance.
Greetings

in current shell, run ‘. .profile’ or relogining

Thanx for your answer!
but neither reloging has an effect (I tried this before), nor running ‘.profile’!
I think the problem is, that the aliases are only valid in the actual shell.
So the aliases typed in ‘.profile’ are vaild in the “shell” from which ‘.profile’ where started at the beginning of the photon-session. But not in the shells opened by the user.
So how can I make aliases which are valid in all shells. I think there is a way, because there are aliases defined by the system. But I don’t know where those are defined.

try the following:
put your aliases into a seperate file (e.g. /home/foo/.kshrc)
add the following line to your .profile:

export ENV=/home/foo/.kshrc

Do . .kshrc to get your aliases for the current shell.
after relogin (at least after reboot) it should work for all shells.

This way it works perfectly fine on my QNX box.

Thanx a lot! It works. :slight_smile: :sunglasses:

:question:
But I wonder why this works and the direct typing of the aliases not.
If you type “export…” in a shell, the variable you set isn’t valid in an other shell.The same with aliases.
But the behaviour is different, when I write them in the “.profile”-file.
Why?
:question:

I think this should be in .sh file, not .profile file.