0

This question already has an answer here:

Where any aliased command is stored? If I am aliasing "ls" as "l" then where will that aliased be stored? Does it affect .bashrc or .cshrc?

marked as duplicate by Kusalananda bash Dec 18 '18 at 10:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

There is no persistence for aliased commands - so if you 'alias l ls' and then exit bash, the alias is lost.

If you want them to persist, put them in ~/.bashrc

  • The alias is lost because it’s stored in memory for the shell process. Making them persist, as wef points out, means that a shell process reads a configuration file at startup to store desired configurations in memory. – Peschke Dec 18 '18 at 6:40

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