AmigaOS allow[ed|s] to do an assign a path to a short handle. For example FONTS: can point to DH0:System/fonts. Then you can refer all the times to FONTS: like cd FONTS: , ls FONTS: and so on.

In bash I could not find the same thing. I found something similar using the ln command. But that one works only in a specific folder, i.e. I can define the link in my home folder to the /usr/lib. Then I can refer to ~/lib.

Is there something like a global link? This would be something like lib: that would always point to the /usr/lib/.

More info on the Amiga assign command: http://wiki.amigaos.net/wiki/AmigaOS_Manual:_AmigaDOS_Command_Reference#ASSIGN


2 Answers 2


Not directly analogous, but you can set an environment variable (in your .bashrc if you want it to persist).

export LIB="/usr/lib"

Then you can use

cd $LIB
  • 2
    You should mention shopt -s cdable_vars as part of your answer.
    – icarus
    Dec 28, 2016 at 3:27
  • 1
    And also CDPATH. Dec 28, 2016 at 7:38

I had the same problem (really wishing there was something like the assign command). I do really do miss some of the stuff from the Amiga.

I ended up writing my own. You can get it from https://github.com/TheBeef/AmigaAssign

It works by exporting bash variables similar to Elliott Frisch's answer but lets you add new ones with out editing any files, lets you list just the assignments instead of all env variables and remove them again without editing any files.

On the down side, it only works for the shell (you can't use the assignments in GUI programs) and if you have a number of shells open it won't be available until you reopen them or resource the stored assignment list (a hidden file in your home directory).

You must log in to answer this question.

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