There could be many reasons for wanting to create a bash script I use them for multiple reasons. The main bash script that I always update is one I have created for a fresh install of Ubuntu and can easily be modified for any Debian based system. You can find mine at the bottom of this post. To get started you need nothing more than a text editor. I use Gedit for pretty much anything like it you can install that by searching for it in the software center or by typing:
Maybe you have one or more other devices you want on Linux and you want the ability to control that device from anywhere in your network. As long as you know the basics of the terminal if not you may want to read this:
Firstly on any device, you want to connect to, you will want to install SSH. You can do this by:
sudo apt install ssh
Now you have SSH installed its easy to log in. Before we get started, take note of your computer’s name on the network do to this load any terminal window and you are greeting by yourusername@yourpcname, (Example below) write this down or remember it and head to the PC you want to remote connect with and load a terminal.
Making the terminal easyer for day to day use is something we all want for example wouldn’t it be better if you could just type “uu” instead of “sudo apt update && sudo apt upgrade” Well with this tutorial you can do just that so let’s get started.
First, you want to load into the bashrc file to do that type:
sudo nano .bashrc
Now scroll to the bottom and type:
alias uu=’sudo apt update && sudo apt upgrade’
You can do this with virtually any command for the terminal, for example, we will make a short version to edit the bashrc file: