Send email using postfix

I am trying to send an email to my gmail using postfix. I am using windows 10 Ubuntu 18.04 bash shell. I have tried the website tutorials and was unsuccessful.

You are trying to set postfix to relay mail thru gmail presume ?

This looks like a reasonable howto.
Getting started with Postfix, an open source mail transfer agent | Opensource.com

Regards
Peasant.

I am still unsuccessful. The only problem I ran into was with the command "systemctl restart postfix.service" (System has not been booted with systemd as init system (PID 1). Can't operate.). I also have to use sudo before the commands in the tutorial.

Try

service postfix restart

as root (prefix with sudo if you are not root).

The command worked but I was unable to send an email successfully. Do I need to be root to send an email?

You don't need to be root to send email.

What diagnostics are you getting when you try to send email?

I do not get any errors when I try to send an email, but the email doesn't send.