Skip to content
Advertisement

creating an alias and then store?

I want to create an alias like cp, mv, and rm commands then somehow prompts the user for confirmation and store the commands in the bashrc file. how would I do this? do I just create an alias and then copy them or append them into the ~/.bashrc file?

Advertisement

Answer

Yes, just copy the exact alias command like it was in the console, into the ~/.basrc file.

Remember that the new alias will take effect after you relaunch the terminal emulator (strictly speaking, the bash process).

Edit:

The obligatory link to the high-rated SO question on the topic.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement