From what I understand I can make a text file with all commands same as I would type in terminal, make it executable and run it.

Would running sudo mysetup.sh or mysetup.txt be OK so not typing PW hundreds of times?.

Can I use geddit not vi its too hard to use vi for me, I'm new / old man

I need to learn basics of shell scripting any help links appreciated.

I know to write terminal commands and make the file executable, but i cn't do simple stuff like put a line break inbetween my echo statements.

Problem is I have install Ubunutu nearly 50 times now, every time I have to re-do all my terminal work sudo update sudo apt-get install gimp etc ect about 100 lines of code every time, if I could just save a script it would be brilliant.

I need to learn basics, how to make it tell user what script is doing, ( i know echo but not paragraphing it?) also I not sue if i shud be writing sudo before every command or just sudoing the script when running it.


You can write a command script with editor vi or vim. Files shall be executable. Make them with "chmod a+x File" Put your scripy in directory where system path is located. In Terminal you find path with : echo $PATH.

| improve this answer | |
  • Is there a way of putting paragraphs in? – P3nT3stLearner Feb 28 '15 at 10:34
  • I use echo "Installing fail2ban" but so cluttered fast wud be nice for paragraphs so each step can be seen, my friend wants the script too as its designed to install essentials like gimp, wireshark etc and setup security like ufw etc – P3nT3stLearner Feb 28 '15 at 10:35

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.