Sitemap
Marcos Dias

Marcos Dias

I'm making this blog to document the tools and simplify the world of technology, more focused on infrastructure and devops.

First Steps in Shell script

1 min readDec 14, 2022

--

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 vim

Test, if open a black screen with various ~, it’s working:

vi test.sh

For Windows,

I consider you’ll need to install WSL (windows subsystem Linux), Type this on your terminal:

wsl --install

To 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 debian

After you have installed wsl, you can start your Linux distro on terminal.

Press enter or click to view image in full size

You’ll have some errors like you don’t have a root permission, so in your CMD (windows)enter:

debian config --default-user root

It’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:

passwrd

Type 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 vim

Test, if open a black screen with various ~, it’s working:

vi test.sh

--

--

Marcos Dias
Marcos Dias

I'm making this blog to document the tools and simplify the world of technology, more focused on infrastructure and devops.