Go with a shell script. All it is, is a script that contains regular commands. Its like a windows autoexec(but with more options) for an example, make a file, test.sh, in it just put
Then make sure it has executable permissions, and do ./test.sh and see what happens, then take it from there. Search the web, you can get more help on it. I think it is important that you do this on your own.