Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After repeating an Arch Linux installation for several times I started to wonder whether I could make things easier for me in the future by taking some general commands that I am bound to use again and create an alias out of them. I wonder if it would be possible to just create a list of aliases into a file and then whenever I need/want to do a reinstall I could shave off some typing by using those aliases. Is something like this possible?

share|improve this question
1  
You can declare aliases in your shell's conf file. (~/.bashrc, ~/.zshrc, etc) If you are asking about an easy way to reinstall your config files, you might want to put your dotfiles on github. –  demure May 21 '13 at 17:35
    
I was thinking something like that as in: copy the alias container file from say a removable drive and use them do declare aliases during installation with a single command. I was also thinking if this could be integrated into the installation media directly. –  Grietom May 21 '13 at 18:54

1 Answer 1

On your build image, you can stick the alias commands into the file which will become /etc/profile and each time you build the box, you transfer these commands into the newly installed system, usable by any user you happen to create.

If these commands are only for your use and you are setting up the system as root, you can modify root's .${SHELL}rc file and stick them in.

Having said that, if these commands are of esoteric nature and made available to unknowing folks, especially they have some sort of easy to mis-type strings, you are setting yourself up for trouble. If this is the case, I suggest obliterating them after you are done with your installation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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