0

When I defined some aliases on Ubuntu vivid(15.04) via the terminal, it clears all aliases after I close the window. What can the problem be?

  • 1
    If you want a permanent alias, you need to put them in ~/.bash_aliases in form of e.g. alias install='sudo apt-get install'. – pileofrocks Jun 4 '15 at 22:38
  • There is no bash.aliases on my home directory And I dont know how to add command with starts "if" and finishes"fi" for aliases. – makgun Jun 4 '15 at 22:57
  • Just create the file then. 2nd question: bash scripts? – pileofrocks Jun 5 '15 at 2:47
  • I tried to create the file and then again I defined some aliases via the terminal but it doesnt work – makgun Jun 5 '15 at 9:15
  • Not via the terminal, but write/add them to the file. – pileofrocks Jun 5 '15 at 18:01
3

There is no problem. It works as intended.

You set up a temporary alias. You exit the shell. The temporary alias is gone like the evening wind.

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.