First Steps in Shell script
Pre-Requisites:
You must learn how to operate with basic Linux to start learning about Shell Script, I recommend you take a little course about it before starting.
For Linux,
you’ll need to install the ‘vi’ or ‘vim’ program:
sudo apt-get install vimTest, if open a black screen with various ~, it’s working:
vi test.shFor Windows,
I consider you’ll need to install WSL (windows subsystem Linux), Type this on your terminal:
wsl --installTo change the distribution installed, enter: wsl --install -d <Distribution Name>. Replace <Distribution Name> with the name of the distribution you would like to install. Ex:
wsl --install -d debianAfter you have installed wsl, you can start your Linux distro on terminal.
You’ll have some errors like you don’t have a root permission, so in your CMD (windows)enter:
debian config --default-user rootIt’ll make the program entering the terminal of the WSL Debian as a root ever. Enter the Linux terminal and change the root password, for it, type this:
passwrdType your password and confirm, then after you’ve set your password, we can start our program.
Get Marcos Dias’s stories in your inbox
Join Medium for free to get updates from this writer.
Install Vim:
sudo apt-get install vimTest, if open a black screen with various ~, it’s working:
vi test.sh







